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.Point3D Class Reference

One simple point in space. More...

Inheritance diagram for VisiMath.Geometry.Point3D:

List of all members.

## Public Member Functions
| Point3D (System.Xml.XmlReader reader)
| XML reader constructor.
| Point3D (IVertex vertex)
| Constructs geopoint from vertex.
override IGeometry | GetCopy ()
| Returns copy of the geometric data.
| Point3D (Vector3 pos)
| Constructs geopoint from position data (just position vertex!)
override IGeometry | ConvertToPrimitive (Type VertexType, PrimitiveTypes primType, float quality=0, int vertexlimit=0)
| Converts object to new geometry object with specified primitive type and optionally with quality parameters. Point can be converted only to point or pointlist. Rest types return null.
override Point3DList | ToPoints (Type VertexType, float quality=0, int vertexlimit=0)
| Returns new point list with this point. Parameters are ignored.
override LineList | ToLines (Type VertexType, float quality=0, int vertexlimit=0)
| Point can't be converted to lines - returns null.
override TriangleList | ToTriangles (Type VertexType, float quality=0, int vertexlimit=0)
| Point can't be converted to triangles - returns null.
override IndexedMesh | ToIndexedMesh (Type VertexType, float quality=0, int vertexlimit=0)
| Point can't be converted to mesh - returns null.
override float | Distance (IGeometry obj)
| Returns closest distance from the generic geometric object.
override float | DistanceLineSegment (ref Vector3 pos1, ref Vector3 pos2)
| Returns closest distance to the line segment. Generic, from center, OVERRIDE!
override float | DistanceSphere (ref Vector3 center, float radius)
| Returns closest distance to the sphere.
override float | DistanceTriangle (ref Vector3 pos1, ref Vector3 pos2, ref Vector3 pos3)
| Returns closest distance to the triangle.
override bool | Intersects (IGeometry obj)
| Returns true if point is inside object.
override bool | ContainsPosition (Vector3 pos)
| Checks if specified position is inside the object - for point only if the point has same coordinates.
override Vector3 | IntersectionPoint (IGeometry obj)
| Returns closest point of the intersection between object and ray. For point it's either it's position or invalid vector.
override bool | GetIntersectionInfo (Ray obj, ref IIntersectionInfo inters)
| Check for intersection and fills intersection info if intersection is closer to the origin of the ray then value before.
override float | IntersectsMoving (float radius, Ray ray, float maxdistance)
| Checks for intersection between object and moving sphere.
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.
void | GetLocalSupportingVertex (ref Vector3 direction, out Vector3 vertex)
| Gets supporting vertex in local coordinates.
void | GetVertex (int index, out Vector3 vertex)
| Returns vertex with specified index, valid for explicit object types.
## Properties
override bool | IsPrimitive`[get]`
| Is object geometric renderable primitive from enumaration PrimitiveTypes?
override Vector3 | Center`[get]`
| Center of the object.
override PrimitiveTypes | PreferredPrimitive`[get]`
| Preferred primitive type for rendering.
override bool | IsContainer`[get]`
| If geometry object is container, it's made of several joined objects.
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)
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

One simple point in space.

## Constructor & Destructor Documentation

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

XML reader constructor.

Parameters:

  reader | XML reader

VisiMath.Geometry.Point3D.Point3D | ( | IVertex | vertex | ) |

Constructs geopoint from vertex.

Parameters:

  vertex | vertex

VisiMath.Geometry.Point3D.Point3D | ( | Vector3 | pos | ) |

Constructs geopoint from position data (just position vertex!)

Parameters:

  pos |

## Member Function Documentation

bool VisiMath.Geometry.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.ContainsFully | ( | IConvexObject | convex | ) |

Return true if index FULLY contains generic convex object.

Parameters:

  convex | Convex object

Returns:
  True if object is fully contained in index

Implements VisiMath.Collisions.ISpatialIndex.

bool VisiMath.Geometry.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.Point3D.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.

bool VisiMath.Geometry.Point3D.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.

override bool VisiMath.Geometry.Point3D.ContainsPosition | ( | Vector3 | pos | ) | `[virtual]`

Checks if specified position is inside the object - for point only if the point has same coordinates.

Parameters:

  pos | Position to check

Returns:
  True if vector is inside the object

Implements VisiMath.Geometry.BaseGeometry.

override IGeometry VisiMath.Geometry.Point3D.ConvertToPrimitive | ( | Type | VertexType,
|  | PrimitiveTypes | primType,
|  | float | quality = `0`,
|  | int | vertexlimit = `0`
| ) |  | `[virtual]`

Converts object to new geometry object with specified primitive type and optionally with quality parameters. Point can be converted only to point or pointlist. Rest types return null.

Parameters:

  primType | Specified type of the primitive
  VertexType | Required type of the vertex
  quality | Required quality
  vertexlimit | Vertex limit

Returns:
  New object of specified type

Reimplemented from VisiMath.Geometry.BaseGeometry.

override float VisiMath.Geometry.Point3D.Distance | ( | IGeometry | obj | ) | `[virtual]`

Returns closest distance from the generic geometric object.

Parameters:

  obj | Object to check distance with

Returns:
  Closest distance to the object

Reimplemented from VisiMath.Geometry.BaseGeometry.

override float VisiMath.Geometry.Point3D.DistanceLineSegment | ( | ref Vector3 | pos1,
|  | ref Vector3 | pos2
| ) |  | `[virtual]`

Returns closest distance to the line segment. Generic, from center, OVERRIDE!

param name="pos1">Start of the line

param name="pos2">end of the line

Returns:
  Closest distance

Reimplemented from VisiMath.Geometry.BaseGeometry.

override float VisiMath.Geometry.Point3D.DistanceSphere | ( | ref Vector3 | center,
|  | float | radius
| ) |  | `[virtual]`

Returns closest distance to the sphere.

Parameters:

  center | center of the sphere
  radius | radius of the sphere

Returns:
  Closest distance

Reimplemented from VisiMath.Geometry.BaseGeometry.

override float VisiMath.Geometry.Point3D.DistanceTriangle | ( | ref Vector3 | pos1,
|  | ref Vector3 | pos2,
|  | ref Vector3 | pos3
| ) |  | `[virtual]`

Returns closest distance to the triangle.

Parameters:

  pos1 | First corner
  pos2 | Second corner
  pos3 | Third corner

Returns:
  Distance

Reimplemented from VisiMath.Geometry.BaseGeometry.

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

Returns copy of the geometric data.

Returns:
  Full copy of the geometry

Implements VisiMath.Geometry.BaseGeometry.

override bool VisiMath.Geometry.Point3D.GetIntersectionInfo | ( | Ray | obj,
|  | ref IIntersectionInfo | inters
| ) |  | `[virtual]`

Check for intersection and fills intersection info if intersection is closer to the origin of the ray then value before.

Parameters:

  inters | Data structure with intersection info
  obj | Ray object

Returns:
  True if there was an intersection and it was closer then previous stored

Implements VisiMath.Geometry.BaseGeometry.

void VisiMath.Geometry.Point3D.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.Point3D.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 Vector3 VisiMath.Geometry.Point3D.IntersectionPoint | ( | IGeometry | obj | ) | `[virtual]`

Returns closest point of the intersection between object and ray. For point it's either it's position or invalid vector.

Parameters:

  obj | Object to check

Returns:
  Point of intersection or invalid Vector3 (with double.NaN as values)

Reimplemented from VisiMath.Geometry.BaseGeometry.

override bool VisiMath.Geometry.Point3D.Intersects | ( | IGeometry | obj | ) | `[virtual]`

Returns true if point is inside object.

Parameters:

  obj | Object to intersect with

Returns:
  true if point is inside object

Reimplemented from VisiMath.Geometry.BaseGeometry.

override float VisiMath.Geometry.Point3D.IntersectsMoving | ( | float | radius,
|  | Ray | ray,
|  | float | maxdistance
| ) |  | `[virtual]`

Checks for intersection between object and moving sphere.

param name="radius">Radius of the sphere

Parameters:

  maxdistance | Maximal distance to travel
  ray | Ray describing movement of the sphere

Returns:
  Distance to the intersection or -1 if no intersection exists

Implements VisiMath.Geometry.BaseGeometry.

override IndexedMesh VisiMath.Geometry.Point3D.ToIndexedMesh | ( | Type | VertexType,
|  | float | quality = `0`,
|  | int | vertexlimit = `0`
| ) |  | `[virtual]`

Point can't be converted to mesh - returns null.

Implements VisiMath.Geometry.BaseGeometry.

override LineList VisiMath.Geometry.Point3D.ToLines | ( | Type | VertexType,
|  | float | quality = `0`,
|  | int | vertexlimit = `0`
| ) |  | `[virtual]`

Point can't be converted to lines - returns null.

Implements VisiMath.Geometry.BaseGeometry.

override Point3DList VisiMath.Geometry.Point3D.ToPoints | ( | Type | VertexType,
|  | float | quality = `0`,
|  | int | vertexlimit = `0`
| ) |  | `[virtual]`

Returns new point list with this point. Parameters are ignored.

Returns:
  New pointlist

Implements VisiMath.Geometry.BaseGeometry.

override TriangleList VisiMath.Geometry.Point3D.ToTriangles | ( | Type | VertexType,
|  | float | quality = `0`,
|  | int | vertexlimit = `0`
| ) |  | `[virtual]`

Point can't be converted to triangles - returns null.

Implements VisiMath.Geometry.BaseGeometry.

## Property Documentation

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

Returns spatial index as box.

Implements VisiMath.Collisions.ISpatialIndex.

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

returns spatial index as point (center)

Implements VisiMath.Collisions.ISpatialIndex.

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

Returns spatial index as sphere.

Implements VisiMath.Collisions.ISpatialIndex.

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

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

Implements VisiMath.Geometry.IConvexObject.

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

Center of the object.

Reimplemented from VisiMath.Geometry.Geometry.

override bool VisiMath.Geometry.Point3D.IsContainer`[get]`

If geometry object is container, it's made of several joined objects.

Returns:
  True if container

Reimplemented from VisiMath.Geometry.BaseGeometry.

override bool VisiMath.Geometry.Point3D.IsPrimitive`[get]`

Is object geometric renderable primitive from enumaration PrimitiveTypes?

Reimplemented from VisiMath.Geometry.BaseGeometry.

override PrimitiveTypes VisiMath.Geometry.Point3D.PreferredPrimitive`[get]`

Preferred primitive type for rendering.

Reimplemented from VisiMath.Geometry.BaseGeometry.

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

Returns number of vertices, valid for explicit object types.

Implements VisiMath.Geometry.IConvexObject.

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

- Points.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events