Simple mesh object loaded from PLG-style indexed triangle data. More...
#include <mxvk/include/mxvk/mxvk_math.h>
Public Member Functions | |
| void | BuildRenderList (RenderList &list) const |
| Append this object's triangles to a render list. | |
| void | BuildRenderList (RenderList &list) const |
| Append this object's triangles to a render list. | |
| float | ComputeRad () |
| Compute and cache average and maximum local-space radii. | |
| float | ComputeRad () |
| Compute and cache average and maximum local-space radii. | |
| bool | LoadMTL (const std::string &path) |
| Replace this object's material library with an MTL file. | |
| bool | LoadMTL (const std::string &path) |
| Replace this object's material library with an MTL file. | |
| bool | LoadMX (const std::string &path, const vec4D &scale, const vec4D &obj_pos, const vec4D &rotation) |
| Load an MX mesh file using the PLG loader compatibility path. | |
| bool | LoadMX (const std::string &path, const vec4D &scale, const vec4D &obj_pos, const vec4D &rotation) |
| Load an MX mesh file using the PLG loader compatibility path. | |
| bool | LoadOBJ (const std::string &path, const vec4D &scale, const vec4D &obj_pos, const vec4D &rotation) |
| Load a Wavefront OBJ mesh and its referenced MTL material library. | |
| bool | LoadOBJ (const std::string &path, const vec4D &scale, const vec4D &obj_pos, const vec4D &rotation) |
| Load a Wavefront OBJ mesh and its referenced MTL material library. | |
| bool | LoadPLG (const std::string &path, const vec4D &scale, const vec4D &obj_pos, const vec4D &rotation) |
| Load a PLG mesh file. | |
| bool | LoadPLG (const std::string &path, const vec4D &scale, const vec4D &obj_pos, const vec4D &rotation) |
| Load a PLG mesh file. | |
| void | ModelToWorld (int type=0) |
| Convert local or transformed vertices to world space. | |
| void | ModelToWorld (int type=0) |
| Convert local or transformed vertices to world space. | |
| void | RemoveFaces (const vec4D &pos) |
| Mark object polygons that face away from a view position. | |
| void | RemoveFaces (const vec4D &pos) |
| Mark object polygons that face away from a view position. | |
| void | Reset () |
| Reset object and polygon state to active. | |
| void | Reset () |
| Reset object and polygon state to active. | |
| void | SetState (int new_state) |
| Replace the object state flags. | |
| void | SetState (int new_state) |
| Replace the object state flags. | |
| void | TransformObject (const Mat4D &mrot, int type=0) |
| Apply a transform to local vertices, transformed vertices, or local-to-transformed output. | |
| void | TransformObject (const Mat4D &mrot, int type=0) |
| Apply a transform to local vertices, transformed vertices, or local-to-transformed output. | |
Public Attributes | |
| int | attr = 0 |
| Object attributes. | |
| float | avg_rad = 0.0f |
| Average radius from the local origin. | |
| vec4D | dir |
| Object direction. | |
| std::vector< vec4D > | local |
| Local-space vertices. | |
| std::string | material_library_path |
| Resolved path of the OBJ material library. | |
| std::vector< OBJMaterial > | materials |
| Materials loaded from the OBJ material library. | |
| float | max_rad = 0.0f |
| Maximum radius from the local origin. | |
| int | num_polys = 0 |
| Number of loaded polygons. | |
| int | num_vertices = 0 |
| Number of loaded vertices. | |
| std::string | object_name |
| Object name loaded from the model file. | |
| int | state = MX_ACTIVE |
| Object state flags. | |
| std::vector< vec2D > | texcoords |
| Optional texture coordinates corresponding to local-space vertices. | |
| std::vector< vec4D > | trans |
| Transformed vertices. | |
| vec4D | ux |
| Local X basis vector. | |
| vec4D | uy |
| Local Y basis vector. | |
| vec4D | uz |
| Local Z basis vector. | |
| std::vector< Triangle > | vlist |
| Indexed triangle list. | |
| vec4D | world_pos |
| Object world position. | |
Simple mesh object loaded from PLG-style indexed triangle data.
Definition at line 1439 of file mxvk_math.h.
|
inline |
Append this object's triangles to a render list.
Definition at line 1782 of file mxvk_math.h.
|
inline |
Append this object's triangles to a render list.
Definition at line 1779 of file mxvk_math_eigen.hpp.
|
inline |
Compute and cache average and maximum local-space radii.
Definition at line 1807 of file mxvk_math.h.
|
inline |
Compute and cache average and maximum local-space radii.
Definition at line 1804 of file mxvk_math_eigen.hpp.
|
inlinenodiscard |
Replace this object's material library with an MTL file.
Definition at line 1704 of file mxvk_math.h.
|
inlinenodiscard |
Replace this object's material library with an MTL file.
Definition at line 1701 of file mxvk_math_eigen.hpp.
|
inlinenodiscard |
Load an MX mesh file using the PLG loader compatibility path.
Definition at line 1624 of file mxvk_math.h.
|
inlinenodiscard |
Load an MX mesh file using the PLG loader compatibility path.
Definition at line 1621 of file mxvk_math_eigen.hpp.
|
inlinenodiscard |
Load a Wavefront OBJ mesh and its referenced MTL material library.
Wavefront faces may use independent position and texture-coordinate indices, negative indices, triangles, quads, or concave polygons. Faces are triangulated and de-indexed into the representation used by the software rasterizer. MTL diffuse colors become triangle colors.
Definition at line 1636 of file mxvk_math.h.
|
inlinenodiscard |
Load a Wavefront OBJ mesh and its referenced MTL material library.
Wavefront faces may use independent position and texture-coordinate indices, negative indices, triangles, quads, or concave polygons. Faces are triangulated and de-indexed into the representation used by the software rasterizer. MTL diffuse colors become triangle colors.
Definition at line 1633 of file mxvk_math_eigen.hpp.
|
inlinenodiscard |
Load a PLG mesh file.
| path | File path to load. |
| scale | Per-axis scale applied to vertices. |
| obj_pos | World position assigned to the object. |
| rotation | Object direction assigned after loading. |
Vertex lines may contain optional u v texture coordinates after x y z. Blank lines and lines beginning with # are ignored. If loading fails, the object retains its previous mesh, texture coordinates, and transform.
Definition at line 1507 of file mxvk_math.h.
|
inlinenodiscard |
Load a PLG mesh file.
| path | File path to load. |
| scale | Per-axis scale applied to vertices. |
| obj_pos | World position assigned to the object. |
| rotation | Object direction assigned after loading. |
Vertex lines may contain optional u v texture coordinates after x y z. Blank lines and lines beginning with # are ignored. If loading fails, the object retains its previous mesh, texture coordinates, and transform.
Definition at line 1507 of file mxvk_math_eigen.hpp.
|
inline |
Convert local or transformed vertices to world space.
Definition at line 1730 of file mxvk_math.h.
|
inline |
Convert local or transformed vertices to world space.
Definition at line 1727 of file mxvk_math_eigen.hpp.
|
inline |
Mark object polygons that face away from a view position.
Definition at line 1763 of file mxvk_math.h.
|
inline |
Mark object polygons that face away from a view position.
Definition at line 1760 of file mxvk_math_eigen.hpp.
|
inline |
Reset object and polygon state to active.
Definition at line 1799 of file mxvk_math.h.
|
inline |
|
inline |
Replace the object state flags.
Definition at line 1823 of file mxvk_math.h.
|
inline |
Replace the object state flags.
Definition at line 1820 of file mxvk_math_eigen.hpp.
|
inline |
Apply a transform to local vertices, transformed vertices, or local-to-transformed output.
Definition at line 1744 of file mxvk_math.h.
|
inline |
Apply a transform to local vertices, transformed vertices, or local-to-transformed output.
Definition at line 1741 of file mxvk_math_eigen.hpp.
| int mxvk::mxObject::attr = 0 |
Object attributes.
Definition at line 1445 of file mxvk_math.h.
| float mxvk::mxObject::avg_rad = 0.0f |
Average radius from the local origin.
Definition at line 1448 of file mxvk_math.h.
| vec4D mxvk::mxObject::dir |
Object direction.
Definition at line 1457 of file mxvk_math.h.
| std::vector< vec4D > mxvk::mxObject::local |
Local-space vertices.
Definition at line 1475 of file mxvk_math.h.
| std::string mxvk::mxObject::material_library_path |
Resolved path of the OBJ material library.
Definition at line 1493 of file mxvk_math.h.
| std::vector< OBJMaterial > mxvk::mxObject::materials |
Materials loaded from the OBJ material library.
Definition at line 1490 of file mxvk_math.h.
| float mxvk::mxObject::max_rad = 0.0f |
Maximum radius from the local origin.
Definition at line 1451 of file mxvk_math.h.
| int mxvk::mxObject::num_polys = 0 |
Number of loaded polygons.
Definition at line 1472 of file mxvk_math.h.
| int mxvk::mxObject::num_vertices = 0 |
Number of loaded vertices.
Definition at line 1469 of file mxvk_math.h.
| std::string mxvk::mxObject::object_name |
Object name loaded from the model file.
Definition at line 1487 of file mxvk_math.h.
| int mxvk::mxObject::state = MX_ACTIVE |
Object state flags.
Definition at line 1442 of file mxvk_math.h.
| std::vector< vec2D > mxvk::mxObject::texcoords |
Optional texture coordinates corresponding to local-space vertices.
Definition at line 1481 of file mxvk_math.h.
| std::vector< vec4D > mxvk::mxObject::trans |
Transformed vertices.
Definition at line 1478 of file mxvk_math.h.
| vec4D mxvk::mxObject::ux |
Local X basis vector.
Definition at line 1460 of file mxvk_math.h.
| vec4D mxvk::mxObject::uy |
Local Y basis vector.
Definition at line 1463 of file mxvk_math.h.
| vec4D mxvk::mxObject::uz |
Local Z basis vector.
Definition at line 1466 of file mxvk_math.h.
| std::vector< Triangle > mxvk::mxObject::vlist |
Indexed triangle list.
Definition at line 1484 of file mxvk_math.h.
| vec4D mxvk::mxObject::world_pos |
Object world position.
Definition at line 1454 of file mxvk_math.h.