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 | Protected Member Functions | Protected Attributes | Properties
VisiMath.Geometry.ConvexHull Class Reference

Convex hull - indexed mesh containing convex polyhedron. More...

Inheritance diagram for VisiMath.Geometry.ConvexHull:

List of all members.

## Public Member Functions
override IGeometry | GetCopy ()
| Returns copy of the geometric data.
| ConvexHull (ConvexHull source)
| Copy constructor.
| ConvexHull (IndexedMesh mesh)
| Constructs hull from indexed mesh.
| ConvexHull (System.Xml.XmlReader reader)
| XML reader constructor.
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.
bool | Contains (ref ISpatialIndex index)
| return true if index contains (intersects) another index
bool | Contains (Vector3 index)
| Return true if index contains position.
bool | Contains (ref Vector3 index)
| Return true if index contains position.
bool | Contains (Point3D index)
| Return true if index contains position.
bool | ContainsLine (Vector3 line1, Vector3 line2)
| Return true if index contains line.
bool | ContainsLine (ref Vector3 line1, ref Vector3 line2)
| Return true if index contains line.
bool | Contains (LineSegment3D line)
| Return true if index contains line.
bool | Contains (Vector3 center, float radius)
| Return true if index contains sphere.
bool | Contains (ref Vector3 center, float radius)
| Return true if index contains sphere.
bool | Contains (Sphere sphere)
| Return true if index contains sphere.
bool | ContainsBox (Vector3 min, Vector3 max)
| Return true if index contains axis alligned box.
bool | ContainsBox (ref Vector3 min, ref Vector3 max)
| Return true if index contains axis alligned box.
bool | Contains (AABox box)
| Return true if index contains axis alligned box.
bool | Contains (IConvexObject convex)
| Return true if index contains generic convex object.
bool | ContainsFully (ref ISpatialIndex index)
| return true if index fully contains another index
bool | ContainsFullyLine (Vector3 line1, Vector3 line2)
| Return true if index fully contains line.
bool | ContainsFullyLine (ref Vector3 line1, ref Vector3 line2)
| Return true if index fully contains line.
bool | ContainsFully (LineSegment3D line)
| Return true if index fully contains line.
bool | ContainsFully (Vector3 center, float radius)
| Return true if index fully contains sphere.
bool | ContainsFully (ref Vector3 center, float radius)
| Return true if index fully contains sphere.
bool | ContainsFully (Sphere sphere)
| Return true if index fully contains sphere.
bool | ContainsFullyBox (Vector3 min, Vector3 max)
| Return true if index fully contains axis alligned box.
bool | ContainsFullyBox (ref Vector3 min, ref Vector3 max)
| Return true if index fully contains axis alligned box.
bool | ContainsFully (AABox box)
| Return true if index fully contains axis alligned box.
bool | ContainsFully (IConvexObject convex)
| Return true if index FULLY contains generic convex object CUrrently works only for explicit convex objects!
void | GetEdge (int index, out Vector3 edge1, out Vector3 edge2)
| Get edge vector with specified index.
void | GetNormal (int index, out Vector3 norm)
| Returns normal of face.
void | GetFacePlane (int index, out Vector3 norm, out float d)
| Returns normal of face.
## Protected Member Functions
void | Recalc ()
void | CalcCenter ()
void | CalcBoundBox ()
void | CalcBoundSphere ()
## Protected Attributes
AABox | BoundBox
Sphere | BoundSphere
bool | centervalid = false
bool | boxvalid = false
bool | spherevalid = false
Vector3 | _center
int | edgecount
int | facecount
bool | fullyformed = false
Vector4[] | Planes
int[,] | Edges
int[][] | Faces
## Properties
override Vector3 | Center`[get]`
| Center of the object.
int | VertexCount`[get]`
| Vertex count.
ConvexObjectType | BaseType`[get]`
| Returns implicit (math expression) or explicit (vertex based) type of convex object.
float | Volume`[get]`
| Volume of the object.
AABox | AsBox`[get]`
| Returns spatial index as box.
Sphere | AsSphere`[get]`
| Returns spatial index as sphere.
Vector3 | AsPoint`[get]`
| returns spatial index as point (center)
int | EdgeCount`[get]`
| Edge count.
int | FaceCount`[get]`
| Face count.

## Detailed Description

Convex hull - indexed mesh containing convex polyhedron.

## Constructor & Destructor Documentation

VisiMath.Geometry.ConvexHull.ConvexHull | ( | ConvexHull | source | ) |

Copy constructor.

Parameters:

  source | Source hull

VisiMath.Geometry.ConvexHull.ConvexHull | ( | IndexedMesh | mesh | ) |

Constructs hull from indexed mesh.

Parameters:

  mesh | Mesh, should contain convex object

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

XML reader constructor.

Parameters:

  reader | XML reader

## Member Function Documentation

void VisiMath.Geometry.ConvexHull.CalcBoundBox | ( |  | ) | `[protected]`

void VisiMath.Geometry.ConvexHull.CalcBoundSphere | ( |  | ) | `[protected]`

void VisiMath.Geometry.ConvexHull.CalcCenter | ( |  | ) | `[protected]`

bool VisiMath.Geometry.ConvexHull.Contains | ( | ref ISpatialIndex | index | ) |

return true if index contains (intersects) another index

Parameters:

  index | Second spatial index

Returns:
  True if intersection exists

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.Contains | ( | ref Vector3 | center,
|  | float | radius
| ) |  |

Return true if index contains sphere.

Parameters:

  center | sphere center
  radius | sphere radius

Returns:
  True if intersection exists

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.Contains | ( | Sphere | sphere | ) |

Return true if index contains sphere.

Parameters:

  sphere | sphere index

Returns:
  True if intersection exists

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.Contains | ( | Vector3 | index | ) |

Return true if index contains position.

Parameters:

  index | Position index

Returns:
  True if intersection exists

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.Contains | ( | ref Vector3 | index | ) |

Return true if index contains position.

Parameters:

  index | Position index

Returns:
  True if intersection exists

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.Contains | ( | AABox | box | ) |

Return true if index contains axis alligned box.

Parameters:

  box | AABox

Returns:
  True if intersection exists

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.Contains | ( | IConvexObject | convex | ) |

Return true if index contains generic convex object.

Parameters:

  convex | Convex object

Returns:
  True if intersection exists

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.Contains | ( | Point3D | index | ) |

Return true if index contains position.

Parameters:

  index | Position index

Returns:
  True if intersection exists

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.Contains | ( | LineSegment3D | line | ) |

Return true if index contains line.

Parameters:

  index | line index

Returns:
  True if intersection exists

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.Contains | ( | Vector3 | center,
|  | float | radius
| ) |  |

Return true if index contains sphere.

Parameters:

  center | sphere center
  radius | sphere radius

Returns:
  True if intersection exists

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsBox | ( | Vector3 | min,
|  | Vector3 | max
| ) |  |

Return true if index contains axis alligned box.

Parameters:

  max | Maximal corner
  min | Minimal corner

Returns:
  True if intersection exists

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsBox | ( | ref Vector3 | min,
|  | ref Vector3 | max
| ) |  |

Return true if index contains axis alligned box.

Parameters:

  max | Maximal corner
  min | Minimal corner

Returns:
  True if intersection exists

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsFully | ( | IConvexObject | convex | ) |

Return true if index FULLY contains generic convex object CUrrently works only for explicit convex objects!

Parameters:

  convex | Convex object

Returns:
  True if object is fully contained in index

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsFully | ( | ref Vector3 | center,
|  | float | radius
| ) |  |

Return true if index fully contains sphere.

Parameters:

  center | sphere center
  radius | sphere radius

Returns:
  True if index fully contains other object

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsFully | ( | ref ISpatialIndex | index | ) |

return true if index fully contains another index

Parameters:

  index | Second spatial index

Returns:
  True if index fully contains other object

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsFully | ( | LineSegment3D | line | ) |

Return true if index fully contains line.

Parameters:

  line | Line segment

Returns:
  True if index fully contains other object

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsFully | ( | Vector3 | center,
|  | float | radius
| ) |  |

Return true if index fully contains sphere.

Parameters:

  center | sphere center
  radius | sphere radius

Returns:
  True if index fully contains other object

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsFully | ( | Sphere | sphere | ) |

Return true if index fully contains sphere.

Parameters:

  sphere | sphere index

Returns:
  True if index fully contains other object

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsFully | ( | AABox | box | ) |

Return true if index fully contains axis alligned box.

Parameters:

  box | AABox

Returns:
  True if index fully contains other object

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsFullyBox | ( | ref Vector3 | min,
|  | ref Vector3 | max
| ) |  |

Return true if index fully contains axis alligned box.

Parameters:

  max | Maximal corner
  min | Minimal corner

Returns:
  True if index fully contains other object

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsFullyBox | ( | Vector3 | min,
|  | Vector3 | max
| ) |  |

Return true if index fully contains axis alligned box.

Parameters:

  max | Maximal corner
  min | Minimal corner

Returns:
  True if index fully contains other object

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsFullyLine | ( | Vector3 | line1,
|  | Vector3 | line2
| ) |  |

Return true if index fully contains line.

Parameters:

  line1 | Start of the line
  line2 | End of the line

Returns:
  True if index fully contains other object

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsFullyLine | ( | ref Vector3 | line1,
|  | ref Vector3 | line2
| ) |  |

Return true if index fully contains line.

Parameters:

  line1 | Start of the line
  line2 | End of the line

Returns:
  True if index fully contains other object

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsLine | ( | Vector3 | line1,
|  | Vector3 | line2
| ) |  |

Return true if index contains line.

Parameters:

  line1 | Start of the line
  line2 | End of the line

Returns:
  True if intersection exists

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.ConvexHull.ContainsLine | ( | ref Vector3 | line1,
|  | ref Vector3 | line2
| ) |  |

Return true if index contains line.

Parameters:

  line1 | Start of the line
  line2 | End of the line

Returns:
  True if intersection exists

Implements VisiMath.Collisions.ISpatialIndex.

override IGeometry VisiMath.Geometry.ConvexHull.GetCopy | ( |  | ) | `[virtual]`

Returns copy of the geometric data.

Returns:
  Full copy of the geometry

Reimplemented from VisiMath.Geometry.IndexedMesh.

void VisiMath.Geometry.ConvexHull.GetEdge | ( | int | index,
|  | out Vector3 | edge1,
|  | out Vector3 | edge2
| ) |  |

Get edge vector with specified index.

Parameters:

  index | Edge index
  edge | Vector to store edge

void VisiMath.Geometry.ConvexHull.GetFacePlane | ( | int | index,
|  | out Vector3 | norm,
|  | out float | d
| ) |  |

Returns normal of face.

Parameters:

  index | index of face
  norm | Vector to store normal

void VisiMath.Geometry.ConvexHull.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.ConvexHull.GetNormal | ( | int | index,
|  | out Vector3 | norm
| ) |  |

Returns normal of face.

Parameters:

  index | index of face
  norm | Vector to store normal

void VisiMath.Geometry.ConvexHull.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.

void VisiMath.Geometry.ConvexHull.Recalc | ( |  | ) | `[protected]`

## Member Data Documentation

Vector3 VisiMath.Geometry.ConvexHull._center`[protected]`

AABox VisiMath.Geometry.ConvexHull.BoundBox`[protected]`

Sphere VisiMath.Geometry.ConvexHull.BoundSphere`[protected]`

bool VisiMath.Geometry.ConvexHull.boxvalid = false`[protected]`

bool VisiMath.Geometry.ConvexHull.centervalid = false`[protected]`

int VisiMath.Geometry.ConvexHull.edgecount`[protected]`

int [,] VisiMath.Geometry.ConvexHull.Edges`[protected]`

int VisiMath.Geometry.ConvexHull.facecount`[protected]`

int [][] VisiMath.Geometry.ConvexHull.Faces`[protected]`

bool VisiMath.Geometry.ConvexHull.fullyformed = false`[protected]`

Vector4 [] VisiMath.Geometry.ConvexHull.Planes`[protected]`

bool VisiMath.Geometry.ConvexHull.spherevalid = false`[protected]`

## Property Documentation

AABox VisiMath.Geometry.ConvexHull.AsBox`[get]`

Returns spatial index as box.

Implements VisiMath.Collisions.ISpatialIndex.

Vector3 VisiMath.Geometry.ConvexHull.AsPoint`[get]`

returns spatial index as point (center)

Implements VisiMath.Collisions.ISpatialIndex.

Sphere VisiMath.Geometry.ConvexHull.AsSphere`[get]`

Returns spatial index as sphere.

Implements VisiMath.Collisions.ISpatialIndex.

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

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

Implements VisiMath.Geometry.IConvexObject.

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

Center of the object.

Implements VisiMath.Geometry.IGeometry.

int VisiMath.Geometry.ConvexHull.EdgeCount`[get]`

Edge count.

int VisiMath.Geometry.ConvexHull.FaceCount`[get]`

Face count.

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

Vertex count.

Implements VisiMath.Geometry.IConvexObject.

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

Volume of the object.

Implements VisiMath.Geometry.IVolumetric.

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

- ConvexHull.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events