class ThreeDViewer.Mathematics.Geometry.Model¶
Overview¶
class Model { public: // properties Face[] Faces; Vector3 Center; // methods Model(Face[] faces); static Model operator * (Model model, Matrix4 matrix); static Model FromPly(string path); static Model CreateRectangularCuboidCentered( double height, double width, double depth ); static Model CreateRectangularCuboidOffCenter( double height, double width, double depth ); };
Detailed Documentation¶
Represents a 3D Model.
Properties¶
Face[] Faces
Gets or sets the faces of the model.
Vector3 Center
Gets the center of the model.
Methods¶
Model(Face[] faces)
Initializes a new instance of the Model class.
Parameters:
faces |
Faces of the model. |
static Model FromPly(string path)
Creates a model from a ply file.
Parameters:
path |
The path of the ply file. |
FileNotFoundException |
Thrown if the file doesn’t exist. |
FileFormatException |
Thrown if the file is not in a good format. |
Returns:
The model in the ply file.
static Model CreateRectangularCuboidCentered( double height, double width, double depth )
Creates a rectangular cuboid from the specified sizes centered on itself.
Parameters:
height |
Height of the cuboid. |
width |
Width of the cuboid. |
depth |
Depth of the cuboid. |
Returns:
The created cuboid.
static Model CreateRectangularCuboidOffCenter( double height, double width, double depth )
Creates a rectangular cuboid from the specified sizes centered on its corner.
Parameters:
height |
Height of the cuboid. |
width |
Width of the cuboid. |
depth |
Depth of the cuboid. |
Returns:
The created cuboid.