Class StaticMeshGeometry#
Defined in File StaticGeometry.h
Inheritance Relationships#
Base Type#
public Karana::Scene::AbstractStaticGeometry(Class AbstractStaticGeometry)
Class Documentation#
-
class StaticMeshGeometry : public Karana::Scene::AbstractStaticGeometry#
Concrete triangular mesh geometry class.
See Scene layer for more discussion on the scene layer.
Public Types
-
using Float3Array = Eigen::Matrix<float, Eigen::Dynamic, 3, Eigen::RowMajor>#
type alias for real-valued 3-vector array
-
using Float2Array = Eigen::Matrix<float, Eigen::Dynamic, 2, Eigen::RowMajor>#
type alias for real-valued 2-vector array
-
using Int3Array = Eigen::Matrix<int, Eigen::Dynamic, 3, Eigen::RowMajor>#
type alias for integer-valued 3-vector array
Public Functions
-
StaticMeshGeometry(const Float3Array &positions, const Int3Array &faces, const Float3Array &normals, const Float2Array &surface_map_coords)#
Constructor from vertices and faces. The constructor is not meant to be called directly. Please use the corresponding create(…) method instead to create an instance.
- Parameters:
positions – matrix of vertex positions
faces – matrix of triangles as three vertex indices
normals – matrix of vertex normals
surface_map_coords – matrix of uv (texture) coords
-
StaticMeshGeometry(const StaticMeshGeometry&)#
copy constructor
-
StaticMeshGeometry &operator=(const StaticMeshGeometry&) = delete#
-
StaticMeshGeometry(StaticMeshGeometry&&) = delete#
-
StaticMeshGeometry &operator=(StaticMeshGeometry&&) = delete#
-
virtual Karana::Core::ks_ptr<StaticMeshGeometry> computeMesh() const override#
Convert to a triangular mesh.
- Returns:
The converted mesh
Public Members
-
const Float3Array positions#
vertex positions
-
const Float3Array normals#
vertex normals
-
const Float2Array surface_map_coords#
vertex uv (texture) coordinates
-
std::string filename = ""#
If this mesh comes from a file, this is the filename.
Public Static Functions
-
static Karana::Core::ks_ptr<StaticMeshGeometry> create(const Float3Array &positions, const Int3Array &faces, const Float3Array &normals, const Float2Array &surface_map_coords)#
Create a new instance of CapsuleGeometry from radius and height.
- Parameters:
positions – matrix of vertex positions
faces – matrix of triangles as three vertex indices
normals – matrix of vertex normals
surface_map_coords – matrix of uv (texture) coords
- Returns:
A pointer to the newly created instance of StaticMeshGeometry.
-
using Float3Array = Eigen::Matrix<float, Eigen::Dynamic, 3, Eigen::RowMajor>#