Class TPolyhedron

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TPolyhedron = class(TObject)

Description

Hierarchy

Overview

Fields

Private FF: integer;
Private FV: integer;
Private FVertices: array of TPointd;
Private FFaces: array of TPointi;
Private FBox: array of TPointdArray;
Private FOctTree: TRbwOctTree;
Public bmin: TPointd;
Public bmax: TPointd;
Public radius: extended;
Public StorageIndex: integer;

Methods

Private function GetF: integer;
Private function GetV: integer;
Private function Inbox(q: TPointd): boolean;
Private procedure RandomRay(var ray: TPointd);
Private function BoxTest(n: integer; a, b: TPointd): TBoxTestResult;
Private procedure AddVec(q: TPointd; var ray: TPointd);
Private procedure NormalVec(a, b, c: TPointd; var n: TPointd);
Private function Dot(a: TPointd; b: TPointd): extended;
Private function PlaneCoeff(T: TPointi; var n: TPointd; var D: extended): integer;
Private procedure SubVec(a, b: TPointd; var c: TPointd);
Private function SegPlaneInt(T: TPointi; q, r: TPointd; var p: TPointd; var m: integer): TSegPlaneIntersectResult;
Private function AreaSign(a, b, c: TPointd): integer;
Private function InTri2D(Tp: array of TPointd; pp: TPointd): TInTriangleResult;
Private function InTri3D(T: TPointi; m: integer; p: TPointd): TInTriangleResult;
Private function InPlane(T: TPointi; m: integer; q, r: TPointd; p: TPointd) : TSegTriangleIntersectionResult;
Private function VolumeSign(a, b, c, D: TPointd): integer;
Private function SegTriCross(T: TPointi; q, r: TPointd) : TSegTriangleIntersectionResult;
Private function SegTriInt(T: TPointi; q, r: TPointd; var p: TPointd) : TSegTriangleIntersectionResult;
Private function FacesSame(FaceIndex1, FaceIndex2: integer): boolean;
Private Function GetVertex(const VIndex: integer): TPointd;
Private Function GetFace(const FIndex: integer): TPointi;
Private Function GetBox(const BIndex: integer): TPointdArray;
Private procedure SetVertexValue(const VIndex, DimIndex: integer; const Value: extended);
Private procedure SetVertex(const VIndex: integer; const Value: TPointd);
Private procedure SetFace(const FIndex: integer; const Value: TPointi);
Private procedure SetFaceValue(const FIndex, DimIndex: integer; const Value: integer);
Private procedure SetBox(const BIndex: integer; const Value: TPointdArray);
Private procedure SetBoxPointd(const BIndex, CornerIndex: integer; const Value: TPointd);
Private procedure SetBoxValue(const BIndex, CornerIndex, DimIndex: integer; const Value: extended);
Public constructor Create(VertexCount, FaceCount: integer);
Public destructor Destroy; override;
Public function InPolyHedron(q: TPointd): TInPolyhedronResult;
Public procedure ComputePolyhedronBox;
Public function ComputeBox: extended;
Public function SegmentIntersection(Const ASegment: TSegmentObject): TSegmentList;
Public Procedure GetProps(Var Vol, Area: extended);
Public function PolygonIntersect(APolygon: TXYZPlane): TXYZPlaneList;
Public function VertexIndex(Avertex: TPointd; const LastVertex: integer; EpsilonX: double = 1E-6; EpsilonY: double = 1E-6; EpsilonZ: double = 1E-6) : integer; overload;
Public function VertexIndex(Avertex: TPointd): integer; overload;
Public Procedure EliminateInternalFaces(LastFace, LastVertex: integer);
Public procedure FreeArrays;
Public procedure SetArrayLengths(LastFace, LastVertex: integer);

Properties

Private property F: integer read GetF write FF;
Private property V: integer read GetV write FV;
Public property OctTree: TRbwOctTree read FOctTree;
Public property Vertices[constVIndex:integer]: TPointd read GetVertex write SetVertex;
Public property VertexValue[constVIndex,DimIndex:integer]: extended write SetVertexValue;
Public property Faces[constFIndex:integer]: TPointi read GetFace write SetFace;
Public property FaceValue[constFIndex,DimIndex:integer]: integer write SetFaceValue;
Public property Box[constBIndex:integer]: TPointdArray read GetBox write SetBox;
Public property BoxPointd[constBIndex,CornerIndex:integer]: TPointd write SetBoxPointd;
Public property BoxValue[constBIndex,CornerIndex,DimIndex:integer]: extended write SetBoxValue;
Public property FaceCount: integer read GetF;
Public property VertexCount: integer read GetV;

Description

Fields

Private FF: integer;

number of faces

Private FV: integer;

number of vertices.

Private FVertices: array of TPointd;

adapted from "Computational Geometry in C"

Private FFaces: array of TPointi;

adapted from "Computational Geometry in C"

Private FBox: array of TPointdArray;

adapted from "Computational Geometry in C"

Private FOctTree: TRbwOctTree;
 
Public bmin: TPointd;
 
Public bmax: TPointd;
 
Public radius: extended;
 
Public StorageIndex: integer;
 

Methods

Private function GetF: integer;
 
Private function GetV: integer;
 
Private function Inbox(q: TPointd): boolean;

adapted from "Computational Geometry in C"

Private procedure RandomRay(var ray: TPointd);

adapted from "Computational Geometry in C"

Private function BoxTest(n: integer; a, b: TPointd): TBoxTestResult;

adapted from "Computational Geometry in C"

Private procedure AddVec(q: TPointd; var ray: TPointd);

adapted from "Computational Geometry in C"

Private procedure NormalVec(a, b, c: TPointd; var n: TPointd);

adapted from "Computational Geometry in C"

Private function Dot(a: TPointd; b: TPointd): extended;

adapted from "Computational Geometry in C"

Private function PlaneCoeff(T: TPointi; var n: TPointd; var D: extended): integer;

adapted from "Computational Geometry in C"

Private procedure SubVec(a, b: TPointd; var c: TPointd);

adapted from "Computational Geometry in C"

Private function SegPlaneInt(T: TPointi; q, r: TPointd; var p: TPointd; var m: integer): TSegPlaneIntersectResult;

adapted from "Computational Geometry in C"

Private function AreaSign(a, b, c: TPointd): integer;

adapted from "Computational Geometry in C"

Private function InTri2D(Tp: array of TPointd; pp: TPointd): TInTriangleResult;

adapted from "Computational Geometry in C"

Private function InTri3D(T: TPointi; m: integer; p: TPointd): TInTriangleResult;

adapted from "Computational Geometry in C"

Private function InPlane(T: TPointi; m: integer; q, r: TPointd; p: TPointd) : TSegTriangleIntersectionResult;

adapted from "Computational Geometry in C"

Private function VolumeSign(a, b, c, D: TPointd): integer;

adapted from "Computational Geometry in C"

Private function SegTriCross(T: TPointi; q, r: TPointd) : TSegTriangleIntersectionResult;

adapted from "Computational Geometry in C"

Private function SegTriInt(T: TPointi; q, r: TPointd; var p: TPointd) : TSegTriangleIntersectionResult;

adapted from "Computational Geometry in C"

Private function FacesSame(FaceIndex1, FaceIndex2: integer): boolean;
 
Private Function GetVertex(const VIndex: integer): TPointd;
 
Private Function GetFace(const FIndex: integer): TPointi;
 
Private Function GetBox(const BIndex: integer): TPointdArray;
 
Private procedure SetVertexValue(const VIndex, DimIndex: integer; const Value: extended);
 
Private procedure SetVertex(const VIndex: integer; const Value: TPointd);
 
Private procedure SetFace(const FIndex: integer; const Value: TPointi);
 
Private procedure SetFaceValue(const FIndex, DimIndex: integer; const Value: integer);
 
Private procedure SetBox(const BIndex: integer; const Value: TPointdArray);
 
Private procedure SetBoxPointd(const BIndex, CornerIndex: integer; const Value: TPointd);
 
Private procedure SetBoxValue(const BIndex, CornerIndex, DimIndex: integer; const Value: extended);
 
Public constructor Create(VertexCount, FaceCount: integer);

adapted from "Computational Geometry in C"

Public destructor Destroy; override;
 
Public function InPolyHedron(q: TPointd): TInPolyhedronResult;
 
Public procedure ComputePolyhedronBox;

adapted from "Computational Geometry in C"

Public function ComputeBox: extended;
 
Public function SegmentIntersection(Const ASegment: TSegmentObject): TSegmentList;

adapted from "Computational Geometry in C"

Public Procedure GetProps(Var Vol, Area: extended);
 
Public function PolygonIntersect(APolygon: TXYZPlane): TXYZPlaneList;
 
Public function VertexIndex(Avertex: TPointd; const LastVertex: integer; EpsilonX: double = 1E-6; EpsilonY: double = 1E-6; EpsilonZ: double = 1E-6) : integer; overload;
 
Public function VertexIndex(Avertex: TPointd): integer; overload;
 
Public Procedure EliminateInternalFaces(LastFace, LastVertex: integer);
 
Public procedure FreeArrays;
 
Public procedure SetArrayLengths(LastFace, LastVertex: integer);
 

Properties

Private property F: integer read GetF write FF;
 
Private property V: integer read GetV write FV;
 
Public property OctTree: TRbwOctTree read FOctTree;
 
Public property Vertices[constVIndex:integer]: TPointd read GetVertex write SetVertex;
 
Public property VertexValue[constVIndex,DimIndex:integer]: extended write SetVertexValue;
 
Public property Faces[constFIndex:integer]: TPointi read GetFace write SetFace;

adapted from "Computational Geometry in C"

Public property FaceValue[constFIndex,DimIndex:integer]: integer write SetFaceValue;
 
Public property Box[constBIndex:integer]: TPointdArray read GetBox write SetBox;

adapted from "Computational Geometry in C"

Public property BoxPointd[constBIndex,CornerIndex:integer]: TPointd write SetBoxPointd;
 
Public property BoxValue[constBIndex,CornerIndex,DimIndex:integer]: extended write SetBoxValue;
 
Public property FaceCount: integer read GetF;
 
Public property VertexCount: integer read GetV;
 

Generated by PasDoc 0.12.1 on 2013-05-13 15:41:31