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

Indexed list of quads. More...

Inheritance diagram for VisiMath.Geometry.IndexedQuads:

List of all members.

## Public Member Functions
override IGeometry | GetCopy ()
| Returns copy of the geometric data.
| IndexedQuads (System.Xml.XmlReader reader)
| Standard constructor from XML.
| IndexedQuads (IndexedQuads copy)
| Copy constructor.
| IndexedQuads (int vertexcount, int indexcount)
| Creates indexed geo with default vertex format, with specified number of vertices, one subset with selected number of indices.
| IndexedQuads (int vertexcount, int indexsets, int[] indexcounts)
| Creates indexed geo with default vertex format, with specified number of vertices, specified number of subset with selected number of indices.
| IndexedQuads (Type vertextype, int vertexcount, int indexcount)
| Creates indexed geo of specified format, with specified number of vertices, one subset and specified number of indices.
| IndexedQuads (Type vertextype, int vertexcount, int indexsets, int[] indexcounts)
| Creates indexed geo of specified format, with specified number of vertices, specified number of subsets and specified number of indices.
| IndexedQuads (IVertexArray source, int indexcount)
| Creates indexed geo from array of vertices one subset and specified number of indices.
| IndexedQuads (IVertexArray source, int indexsets, int[] indexcounts)
| Creates indexed geo from array of vertices specified number of subsets and specified number of indices.
| IndexedQuads (IVertexArray source, int[] indices)
| Creates indexed geo from array of vertices specified with one subset of specified indices.
| IndexedQuads (IVertexArray source, int[][] indices)
| Creates indexed geo from array of vertices and from indices.
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)
| For generic geometry returns distance from the center of the 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 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 ()
| Standard enumerator.
void | RecalculateNormals ()
| Recalculates normals for all quads.
## Properties
override PrimitiveTypes | MeshType`[get]`
| Mesh type - quads.
override int | IndicesPerElement`[get]`
| 4 indices per element for quad
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 quads in list.
int | Count`[get]`
| Returns number of the triangles in list.

## Detailed Description

Indexed list of quads.

## Constructor & Destructor Documentation

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

Standard constructor from XML.

Parameters:

  reader |

VisiMath.Geometry.IndexedQuads.IndexedQuads | ( | IndexedQuads | copy | ) |

Copy constructor.

Parameters:

  copy |

VisiMath.Geometry.IndexedQuads.IndexedQuads | ( | int | vertexcount,
|  | int | indexcount
| ) |  |

Creates indexed geo with default vertex format, with specified number of vertices, one subset with selected number of indices.

Parameters:

  vertexcount | Number of vertices
  indexcount | Number of indices

VisiMath.Geometry.IndexedQuads.IndexedQuads | ( | int | vertexcount,
|  | int | indexsets,
|  | int[] | indexcounts
| ) |  |

Creates indexed geo with default vertex format, with specified number of vertices, specified number of subset with selected number of indices.

Parameters:

  vertexcount | Number of vertices
  indexsets | Number of subsets
  indexcounts | Array with length of all subsets

VisiMath.Geometry.IndexedQuads.IndexedQuads | ( | Type | vertextype,
|  | int | vertexcount,
|  | int | indexcount
| ) |  |

Creates indexed geo of specified format, with specified number of vertices, one subset and specified number of indices.

Parameters:

  vertextype | Type of vertex (must be IVertex)
  vertexcount | Number of vertices
  indexcount | Number of indices

VisiMath.Geometry.IndexedQuads.IndexedQuads | ( | Type | vertextype,
|  | int | vertexcount,
|  | int | indexsets,
|  | int[] | indexcounts
| ) |  |

Creates indexed geo of specified format, with specified number of vertices, specified number of subsets and specified number of indices.

Parameters:

  vertextype | Type of vertex (must be IVertex)
  vertexcount | Number of vertices
  indexsets | Number of subsets
  indexcounts | Array with length of all subsets

VisiMath.Geometry.IndexedQuads.IndexedQuads | ( | IVertexArray | source,
|  | int | indexcount
| ) |  |

Creates indexed geo from array of vertices one subset and specified number of indices.

Parameters:

  source | Source vertex array
  indexcount | number of vertices

VisiMath.Geometry.IndexedQuads.IndexedQuads | ( | IVertexArray | source,
|  | int | indexsets,
|  | int[] | indexcounts
| ) |  |

Creates indexed geo from array of vertices specified number of subsets and specified number of indices.

Parameters:

  source | Source vertex array
  indexsets | Number of subsets
  indexcounts | Array with length of all subsets

VisiMath.Geometry.IndexedQuads.IndexedQuads | ( | IVertexArray | source,
|  | int[] | indices
| ) |  |

Creates indexed geo from array of vertices specified with one subset of specified indices.

Parameters:

  source | Source vertex array
  indices | Array with indices

VisiMath.Geometry.IndexedQuads.IndexedQuads | ( | IVertexArray | source,
|  | int | indices[][]
| ) |  |

Creates indexed geo from array of vertices and from indices.

Parameters:

  source | Source vertex array
  indices | Array with indices

## Member Function Documentation

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

Not dynamic, cannot add! Does nothing.

Parameters:

  geoobject |

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

Reimplemented in VisiMath.Geometry.Ring.

override float VisiMath.Geometry.IndexedQuads.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.IndexedQuads.Distance | ( | ref Vector3 | pos | ) | `[virtual]`

For generic geometry returns distance from the center of the object.

Parameters:

  pos |

Returns:

Reimplemented from VisiMath.Geometry.BaseGeometry.

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

Returns copy of the geometric data.

Returns:
  Full copy of the geometry

Implements VisiMath.Geometry.BaseGeometry.

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

Standard enumerator.

Returns:

override bool VisiMath.Geometry.IndexedQuads.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.IndexedQuads.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.IndexedQuads.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.IndexedQuads.RecalculateNormals | ( |  | ) |

Recalculates normals for all quads.

Implements VisiMath.Geometry.ISurfaceGeo.

override IndexedMesh VisiMath.Geometry.IndexedQuads.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 | Parameters:
    VertexType | Required type of the vertex
  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
  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 LineList VisiMath.Geometry.IndexedQuads.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 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. NOT USED!

Implements VisiMath.Geometry.BaseGeometry.

override Point3DList VisiMath.Geometry.IndexedQuads.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.IndexedQuads.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.IndexedQuads.Count`[get]`

Returns number of the triangles in list.

Implements VisiMath.Geometry.IGeoContainer< T >.

override int VisiMath.Geometry.IndexedQuads.IndicesPerElement`[get]`

4 indices per element for quad

Reimplemented from VisiMath.Geometry.IndexedGeo.

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

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

Reimplemented from VisiMath.Geometry.BaseGeometry.

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

Is object geometric renderable primitive from enumaration PrimitiveTypes?

Reimplemented from VisiMath.Geometry.BaseGeometry.

override PrimitiveTypes VisiMath.Geometry.IndexedQuads.MeshType`[get]`

Mesh type - quads.

Reimplemented from VisiMath.Geometry.IndexedGeo.

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

Preferred primitive type for rendering.

Reimplemented from VisiMath.Geometry.BaseGeometry.

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

Returns or sets quads in list.

Parameters:

  index | index of the quad

Returns:
  New quad object

Warning, if vertex is shared, it will be changed for all quads!

Implements VisiMath.Geometry.IGeoContainer< T >.

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

- IndexedQuads.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events