c_api_mesh.h - Engine C API Reference

c_api_mesh.h
  1. #pragma once
  2. #include "c_api_types.h"
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. struct MeshCApi
  7. {
  8. unsigned (*num_materials) (ConstMeshPtr);
  9. unsigned (*find_material) (ConstMeshPtr, unsigned name_id32);
  10. MaterialPtr (*material) (MeshPtr, unsigned index);
  11. unsigned (*node) (ConstMeshPtr);
  12. void (*set_shader_pass_flag) (MeshPtr, unsigned name_id32, int enabled);
  13. struct BoundingVolumeWrapper (*bounding_volume) (MeshPtr);
  14. void (*set_explicit_sort_value) (MeshPtr, unsigned sort_value);
  15. ConstVector3Ptr (*local_position) (ConstMeshPtr);
  16. struct CApiQuaternion (*local_rotation) (ConstMeshPtr);
  17. ConstVector3Ptr (*local_scale) (ConstMeshPtr);
  18. ConstLocalTransformPtr (*local_pose) (ConstMeshPtr);
  19. void (*set_local_position) (MeshPtr, UnitRef, ConstVector3Ptr);
  20. void (*set_local_rotation) (MeshPtr, UnitRef, ConstQuaternionPtr);
  21. void (*set_local_scale) (MeshPtr, UnitRef, ConstVector3Ptr);
  22. void (*set_local_pose) (MeshPtr, UnitRef, ConstLocalTransformPtr);
  23. ConstVector3Ptr (*world_position) (ConstMeshPtr);
  24. ConstMatrix4x4Ptr (*world_pose) (ConstMeshPtr);
  25. // Performance-warning; Fetches the world_pose, extracts a Matrix3x3 from it and returns a copy on the stack.
  26. struct CApiQuaternion (*world_rotation) (ConstMeshPtr);
  27. };
  28. #ifdef __cplusplus
  29. }
  30. #endif