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

List of quads. More...

Inheritance diagram for VisiMath.Geometry.QuadList:

List of all members.

## Public Member Functions
override IGeometry | GetCopy ()
| Returns copy of the geometric data.
| QuadList (System.Xml.XmlReader reader)
| XML reader constructor.
| QuadList (IVertexArray source)
| Construct QuadList from the vertex array source.
| QuadList (int count)
| Constructs quad list with default vertex type and with place for storing count quads.
| QuadList (Type vertextype, int count)
| Constructs quad list with required vertex type and with place for storing count quads.
override Point3DList | ToPoints (Type VertexType, float quality=0, int vertexlimit=0)
| Convert object to list of points.
override LineList | ToLines (Type VertexType, float quality=0, int vertexlimit=0)
| Convert object to list of lines.
override TriangleList | ToTriangles (Type VertexType, float quality=0, int vertexlimit=0)
| Convert object to list of triangles - returns self.
override IndexedMesh | ToIndexedMesh (Type VertexType, float quality=0, int vertexlimit=0)
| Convert object to indexed triangle mesh. Valid only for surface based objects, otherwise returns null.
override float | Distance (IGeometry obj)
| Returns closest distance from the generic geometric object.
override bool | ContainsPosition (Vector3 pos)
| Checks if specified position is inside the object - point lies on any triangle.
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 bool | GetIntersectionInfo (Ray obj, IntersectionList ilist)
| Check for intersection and adds intersection info if there was any intersection.
override float | Distance (Ray ray, bool frontOnly=false)
| Returns closest distance to the ray.
override float | Distance (ref Vector3 pos)
| Returns distance from the vector.
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 float | IntersectsMoving (float radius, Ray ray, float maxdistance)
| Checks for intersection between object and moving sphere.
void | Add (Quad geoobject)
| Not dynamic, cannot add! Does nothing.
IEnumerator< IGeometry > | GetEnumerator ()
void | RecalculateNormals ()
| Recalculates normals for all triangles.
## Properties
override bool | IsPrimitive`[get]`
| Is object geometric renderable primitive from enumaration PrimitiveTypes?
override PrimitiveTypes | PreferredPrimitive`[get]`
| Preferred primitive type for rendering.
override bool | IsContainer`[get]`
| Quad List works as a list of quads, returns true.
Quad | this[int index]`[get, set]`
| Returns or sets triangles in list.
int | Count`[get]`
| Returns number of the triangles in list.

## Detailed Description

List of quads.

## Constructor & Destructor Documentation

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

XML reader constructor.

Parameters:

  reader | XML reader

VisiMath.Geometry.QuadList.QuadList | ( | IVertexArray | source | ) |

Construct QuadList from the vertex array source.

Parameters:

  source | Source vertex array, must contain 4*quad number vertices!

Exceptions:

  System.ArgumentException | Throw for inccorect number of vertices

VisiMath.Geometry.QuadList.QuadList | ( | int | count | ) |

Constructs quad list with default vertex type and with place for storing count quads.

Parameters:

  count | Number of triangles

VisiMath.Geometry.QuadList.QuadList | ( | Type | vertextype,
|  | int | count
| ) |  |

Constructs quad list with required vertex type and with place for storing count quads.

Parameters:

  count | Number of triangles
  vertextype | Required type of vertex (IVertex type)

## Member Function Documentation

void VisiMath.Geometry.QuadList.Add | ( | Quad | geoobject | ) |

Not dynamic, cannot add! Does nothing.

Parameters:

  geoobject |

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

Checks if specified position is inside the object - point lies on any triangle.

Parameters:

  pos | Position to check

Returns:
  True if vector is inside the object

Implements VisiMath.Geometry.BaseGeometry.

override float VisiMath.Geometry.QuadList.Distance | ( | Ray | ray,
|  | bool | frontOnly = `false`
| ) |  | `[virtual]`

Returns closest distance to the ray.

Parameters:

  ray | Ray to check distance to
  frontOnly | Check only objects in front of the origin

Returns:
  Closest distance to the ray, if frontOnly and object is behind the ray, returns NaN

Reimplemented from VisiMath.Geometry.BaseGeometry.

override float VisiMath.Geometry.QuadList.Distance | ( | ref Vector3 | pos | ) | `[virtual]`

Returns distance from the vector.

Parameters:

  pos |

Returns:

Reimplemented from VisiMath.Geometry.BaseGeometry.

override float VisiMath.Geometry.QuadList.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.QuadList.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.QuadList.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.QuadList.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.QuadList.GetCopy | ( |  | ) | `[virtual]`

Returns copy of the geometric data.

Returns:
  Full copy of the geometry

Implements VisiMath.Geometry.BaseGeometry.

IEnumerator<IGeometry> VisiMath.Geometry.QuadList.GetEnumerator | ( |  | ) |

override bool VisiMath.Geometry.QuadList.GetIntersectionInfo | ( | Ray | obj,
|  | IntersectionList | ilist
| ) |  | `[virtual]`

Check for intersection and adds intersection info if there was any intersection.

Parameters:

  ilist | List for intersections
  obj | Ray object

Returns:
  True if there was an intersection

For now using base version and returns only hit of the closest encountered triangle. Might need reworking to check all tris?

Reimplemented from VisiMath.Geometry.BaseGeometry.

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

override float VisiMath.Geometry.QuadList.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.

void VisiMath.Geometry.QuadList.RecalculateNormals | ( |  | ) |

Recalculates normals for all triangles.

Implements VisiMath.Geometry.ISurfaceGeo.

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

Convert object to indexed triangle mesh. Valid only for surface based objects, otherwise returns null.

Returns:
  New geometry object containing triangle faces of the object surface

Parameters:

  quality | Quality for parametric objects (0-1). Zero is simples possible, 1 maximal for the current dimension of the object. If vertexlimit parameter is used, quality will be reduced to fullfill maximal vertex budget
  VertexType | Required type of the vertex
  vertexlimit | Maximal number of allowed vertices. If set to zero, there's no limit. Used for fully parametric objects or to reduce number of the vertices in complicated objects.

Doesn't check for same vertices

Implements VisiMath.Geometry.BaseGeometry.

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

Convert object to list of lines.

Returns:
  New geometry object containing edges of the object

Parameters:

  quality | Not used
  VertexType | Required vertex type
  vertexlimit | Maximal number of allowed vertices. If set to zero, there's no limit. Used for fully parametric objects or to reduce number of the vertices in complicated objects. NOT USED!

Implements VisiMath.Geometry.BaseGeometry.

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

Convert object to list of points.

Returns:
  New geometry object containing point based definition of the object

Parameters:

  quality | Quality for parametric objects (0-1). Zero is simples possible, 1 maximal for the current dimension of the object. If vertexlimit parameter is used, quality will be reduced to fullfill maximal vertex budget
  VertexType | Required type of the vertex
  vertexlimit | Maximal number of allowed vertices. If set to zero, there's no limit. Used for fully parametric objects or to reduce number of the vertices in complicated objects.

Implements VisiMath.Geometry.BaseGeometry.

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

Convert object to list of triangles - returns self.

Returns:
  New geometry object containing triangle faces of the object surface.

Parameters:

  quality | Quality for parametric objects (0-1). Zero is simples possible, 1 maximal for the current dimension of the object. If vertexlimit parameter is used, quality will be reduced to fullfill maximal vertex budget
  VertexType | Required type of the vertex
  vertexlimit | Maximal number of allowed vertices. If set to zero, there's no limit. Used for fully parametric objects or to reduce number of the vertices in complicated objects.

Triangle list returns pointer to self.

Implements VisiMath.Geometry.BaseGeometry.

## Property Documentation

int VisiMath.Geometry.QuadList.Count`[get]`

Returns number of the triangles in list.

Implements VisiMath.Geometry.IGeoContainer< T >.

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

Quad List works as a list of quads, returns true.

Reimplemented from VisiMath.Geometry.BaseGeometry.

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

Is object geometric renderable primitive from enumaration PrimitiveTypes?

Reimplemented from VisiMath.Geometry.BaseGeometry.

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

Preferred primitive type for rendering.

Reimplemented from VisiMath.Geometry.BaseGeometry.

Quad VisiMath.Geometry.QuadList.this[int index]`[get, set]`

Returns or sets triangles in list.

Parameters:

  index | index of the triangle

Returns:
  New triangle object

Implements VisiMath.Geometry.IGeoContainer< T >.

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

- Quads.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events