|
vector< VECTOR3 > | vertices |
|
BoundingBox * | boundingbox = NULL |
|
- Parameters
-
A | simple 3-dimensional geometric shape, with methods for shape manipulation and merging. |
- Note
- Shapes produced by the factory functions will have orientation 0 0 1 0 1 0, with the origin of the coordinate system being at the center of the shape.
SimpleShape SimpleShape::Box |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
|
static |
- Returns
- A SimpleShape representing a Box.
- Parameters
-
x | The dimension of the box in the x axis |
y | The dimension of the box in the y axis |
z | The dimension of the box in the z axis |
- Note
- The origin (0,0,0) of the box represents its center.
SimpleShape SimpleShape::Circle |
( |
double |
radius, |
|
|
UINT |
segments |
|
) |
| |
|
static |
- Returns
- A SimpleShape representing a circle.
- Parameters
-
radius | the radius of the circle |
segments | The number of radial segments on the circle |
void SimpleShape::createBoundingBox |
( |
| ) |
|
|
private |
SimpleShape SimpleShape::Cylinder |
( |
double |
radius, |
|
|
double |
height, |
|
|
UINT |
segments |
|
) |
| |
|
static |
- Returns
- A SimpleShape representing a cylinder.
- Parameters
-
radius | The radius of the cylinder. The height of the cylinder. |
segments | The number of radial segments to be generated. |
void SimpleShape::destroyBoundingBox |
( |
| ) |
|
|
private |
returns an axis-aligned bounding box of the shape.
- Note
- bounding boxes are generated when this method is first called to avoid unnecessary calculations, since they have to be recalculated every time a shape is transformed. Even after generation bounding boxes are not regenerated until this method is called again, so you are guaranteed to get the currently valid bounding box with a minimum of overhead. Still, alternating boundingbox querying and transformation will result in siginificant cost increas and should be avoided!
void SimpleShape::GetVertices |
( |
vector< VECTOR3 > & |
OUT_vertexlist | ) |
|
|
inline |
sets a reference to the shapes vertex list.
- Parameters
-
OUT_vertexlist | vector reference that will be set to the shapes vertex list. |
merges another shape into this one.
- Note
- Does not check for vertex overlap!
- Parameters
-
merger | The shape to be merged with this. |
Merges a bounding box with the bounding box of this.
- Returns
- true if successful, false if not.
- Note
- In order to successfully merge a bounding box, this shape must already have calculated its bounding box.
SimpleShape SimpleShape::Rectangle |
( |
double |
width, |
|
|
double |
height |
|
) |
| |
|
static |
- Returns
- A SimpleShape representing a rectangle.
- Parameters
-
width | The dimension of the rectangle in the z axis |
hegt | The dimension of the rectangle in the x axis |
- Note
- width and height will always be treated as positive, even if a negative value is passed!
-
Width of the rectangle is along the z axis, height along x.
void SimpleShape::Rotate |
( |
MATRIX3 |
matrix | ) |
|
Rotates a shape by a matrix.
- Parameters
-
matrix | rotation matrix containing the desired rotation |
void SimpleShape::Scale |
( |
VECTOR3 |
scale | ) |
|
Scales a shape in x y z.
- Note
- 0 0 0 is assumed as the origin of the scaling!
- Parameters
-
scale | Defines the scale factors in x y z |
UINT SimpleShape::Size |
( |
| ) |
|
|
inline |
- Returns
- The number of vertices in the shape
SimpleShape SimpleShape::Sphere |
( |
double |
radius, |
|
|
UINT |
segments |
|
) |
| |
|
static |
- Returns
- A SimpleShape representing a sphere.
- Parameters
-
radius | The radius of the sphere |
segments | Number of radial segments on the sphere |
- Note
- the poles of the sphere are aligned with the z-axis!
void SimpleShape::Translate |
( |
VECTOR3 |
offset | ) |
|
translates a shape by the demanded offset
- Parameters
-
offset | The offset by which the shape is to be translated |
The documentation for this class was generated from the following files:
- C:/Orbiter2016/Orbitersdk/IMS2/SimpleShape.h
- C:/Orbiter2016/Orbitersdk/IMS2/SimpleShape.cpp