VisimBox 1.0 VisimBox 3d simulation and visualisation ToolBox

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Properties
VisiMath.Geometry.Pyramid Class Reference

Pyramid geometric object. More...

Inheritance diagram for VisiMath.Geometry.Pyramid:

List of all members.

## Public Member Functions
| Pyramid (System.Xml.XmlReader reader)
| XML reader constructor.
| Pyramid ()
| Creates uninitialized pyramid.
| Pyramid (Type VertexType)
| Creates uninitialized pyramid with specified vertextype.
| Pyramid (Vector3 center, Vector3 top, float width, float height)
| Creates pyramid with default vertextype (normal vertex)
| Pyramid (Type vertexType, Vector3 center, Vector3 top, float width, float height)
| Creates pyramid with specified vertextype.
void | Construct (Vector3 center, Vector3 top, float width, float height)
| Constructs/ reconstructs Pyramid.
void | Construct ()
| Constructs/ reconstructs Pyramid.
override bool | ContainsPosition (Vector3 pos)
| Returns true, if position is inside the pyramid.
override void | WriteXml (System.Xml.XmlWriter writer)
| Serializes object to XML.
override void | ReadXml (System.Xml.XmlReader reader)
| Deserializes object from XML.
void | GetVertex (int index, out Vector3 vertex)
| Returns vertex with specified index, valid for explicit object types.
void | GetLocalSupportingVertex (ref Vector3 direction, out Vector3 vertex)
| Gets supporting vertex in local coordinates.
## Properties
override Vector3 | Center`[get]`
| Center of the object, for pyramid it's centre of the base.
float | Volume`[get]`
| Volume of the object.
ConvexObjectType | BaseType`[get]`
| Returns implicit (math expression) or explicit (vertex based) type of convex object.
int | VertexCount`[get]`
| Returns number of vertices, valid for explicit object types.

## Detailed Description

Pyramid geometric object.

## Constructor & Destructor Documentation

VisiMath.Geometry.Pyramid.Pyramid | ( | System.Xml.XmlReader | reader | ) |

XML reader constructor.

Parameters:

  reader | XML reader

VisiMath.Geometry.Pyramid.Pyramid | ( |  | ) |

Creates uninitialized pyramid.

VisiMath.Geometry.Pyramid.Pyramid | ( | Type | VertexType | ) |

Creates uninitialized pyramid with specified vertextype.

Parameters:

  VertexType | required vertex type

VisiMath.Geometry.Pyramid.Pyramid | ( | Vector3 | center,
|  | Vector3 | top,
|  | float | width,
|  | float | height
| ) |  |

Creates pyramid with default vertextype (normal vertex)

Parameters:

  center | Center of the pyramid base
  top | Top of the pyramid
  width | Width of the base (along x axis)
  height | Height of the base (along y axis)

VisiMath.Geometry.Pyramid.Pyramid | ( | Type | vertexType,
|  | Vector3 | center,
|  | Vector3 | top,
|  | float | width,
|  | float | height
| ) |  |

Creates pyramid with specified vertextype.

Parameters:

  vertexType | Required type of the vertex
  center | Center of the pyramid base
  top | Top of the pyramid
  width | Width of the base (along x axis)
  height | Height of the base (along y axis)

## Member Function Documentation

void VisiMath.Geometry.Pyramid.Construct | ( | Vector3 | center,
|  | Vector3 | top,
|  | float | width,
|  | float | height
| ) |  |

Constructs/ reconstructs Pyramid.

Parameters:

  center | Center of the pyramid base
  top | Top of the pyramid
  width | Width of the base (along x axis)
  height | Height of the base (along y axis)

For textured pyramid uses same texture for base (whole texture) and all sides (triangles from the texture sides to center)

void VisiMath.Geometry.Pyramid.Construct | ( |  | ) |

Constructs/ reconstructs Pyramid.

For textured pyramid uses same texture for base (whole texture) and all sides (triangles from the texture sides to center)

override bool VisiMath.Geometry.Pyramid.ContainsPosition | ( | Vector3 | pos | ) |

Returns true, if position is inside the pyramid.

Parameters:

  pos | Position

Returns:
  True if inside

Implements VisiMath.Geometry.IConvexObject.

void VisiMath.Geometry.Pyramid.GetLocalSupportingVertex | ( | ref Vector3 | direction,
|  | out Vector3 | vertex
| ) |  |

Gets supporting vertex in local coordinates.

Parameters:

  vertex | Save vertex
  direction | Direction vector

Implements VisiMath.Geometry.IConvexObject.

void VisiMath.Geometry.Pyramid.GetVertex | ( | int | index,
|  | out Vector3 | vertex
| ) |  |

Returns vertex with specified index, valid for explicit object types.

Parameters:

  index | index of vertex
  vertex | Vector to save vertex

Implements VisiMath.Geometry.IConvexObject.

override void VisiMath.Geometry.Pyramid.ReadXml | ( | System.Xml.XmlReader | reader | ) | `[virtual]`

Deserializes object from XML.

Parameters:

  reader | XML reader

Reimplemented from VisiMath.Geometry.Geometry.

override void VisiMath.Geometry.Pyramid.WriteXml | ( | System.Xml.XmlWriter | writer | ) | `[virtual]`

Serializes object to XML.

Parameters:

  writer | XML writer to save values

Reimplemented from VisiMath.Geometry.Geometry.

## Property Documentation

ConvexObjectType VisiMath.Geometry.Pyramid.BaseType`[get]`

Returns implicit (math expression) or explicit (vertex based) type of convex object.

Implements VisiMath.Geometry.IConvexObject.

override Vector3 VisiMath.Geometry.Pyramid.Center`[get]`

Center of the object, for pyramid it's centre of the base.

Reimplemented from VisiMath.Geometry.Geometry.

int VisiMath.Geometry.Pyramid.VertexCount`[get]`

Returns number of vertices, valid for explicit object types.

Implements VisiMath.Geometry.IConvexObject.

float VisiMath.Geometry.Pyramid.Volume`[get]`

Volume of the object.

Implements VisiMath.Geometry.IVolumetric.

The documentation for this class was generated from the following file:

- Pyramid.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events