6#if !defined(AFX_3DPOINTLIST_H__CA6BC2A5_FAC2_11D1_A0DE_000000000000__INCLUDED_)
7#define AFX_3DPOINTLIST_H__CA6BC2A5_FAC2_11D1_A0DE_000000000000__INCLUDED_
17BEGIN_MOOTOOLS_NAMESPACE
28inline bool IntCoord::operator!=(
const IntCoord&
pt)
const
40inline bool IntCoord::operator==(
const IntCoord&
pt)
const
63 static inline unsigned int HashValue(
const IntCoord&
pt)
65 #ifdef OLD_HASH_FUNCTIONS
66 return (
unsigned int)(
pt.x +
pt.y +
pt.z);
68 return HashMixValue(HashMixValue(
pt.x) +
pt.y) +
pt.z;
82 double cellDistance[3];
107 double XFromIntCoord(
int intcoord)
const;
108 double YFromIntCoord(
int intcoord)
const;
109 double ZFromIntCoord(
int intcoord)
const;
117template<
typename TYPE>
125inline int* C3DPointGridMap::Lookup(
const C3DPointI&
coord,
int& size)
const
132 voxel.x = cellDistance[0];
133 voxel.y = cellDistance[1];
134 voxel.z = cellDistance[2];
137template<
typename TYPE>
145template<
typename TYPE>
153template<
typename TYPE>
158 values[0] = ((
pt.x - center.x) / cellDistance[0]);
159 values[1] = ((
pt.y - center.y) / cellDistance[1]);
160 values[2] = ((
pt.z - center.z) / cellDistance[2]);
176template<
typename TYPE>
186 return (
int)((
coordinate - center[index]) / cellDistance[index]);
189inline int C3DPointGridMap::XToIntCoord(
double coordinate)
const
191 return (
int)((
coordinate - center.x) / cellDistance[0]);
194inline int C3DPointGridMap::YToIntCoord(
double coordinate)
const
196 return (
int)((
coordinate - center.y) / cellDistance[1]);
199inline int C3DPointGridMap::ZToIntCoord(
double coordinate)
const
201 return (
int)((
coordinate - center.z) / cellDistance[2]);
206 return (
intcoord * cellDistance[index]) + center[index];
209inline double C3DPointGridMap::XFromIntCoord(
int intcoord)
const
211 return (
intcoord*cellDistance[0])+center.x;
214inline double C3DPointGridMap::YFromIntCoord(
int intcoord)
const
216 return (
intcoord*cellDistance[1]) + center.y;
219inline double C3DPointGridMap::ZFromIntCoord(
int intcoord)
const
221 return (
intcoord*cellDistance[2]) + center.z;
224typedef struct WeldProximityMap WeldProximityMap;
229 typedef enum SymetricEdgeInfo
239class DLL_3DFUNCTION C3DPointMethods :
public CPointMethods
241 DECLARE_SERIAL_XOBJECT(C3DPointMethods);
243 SIZET GetSizeof()
const;
244 ElementType GetType()
const;
245 void ConstructElement(
void*
pNewData);
249inline SIZET C3DPointMethods::GetSizeof()
const
254inline ElementType C3DPointMethods::GetType()
const
256 return MAKE_CUSTOM_ID(
'3',
'D',
'P',
'T');
259inline void C3DPointMethods::ConstructElement(
void*
pNewData)
271 int materialGraphLock;
274 virtual bool UpdateList();
288 virtual void RemoveAll();
304 bool SwapCoordinates(
unsigned int swap);
311 void InitPointMaterialGraph(
const CGeomInfo *info);
312 void DeletePointMaterialGraph();
313 bool InitShareSeveralMaterialsFlag();
314 int GetNumberOfMaterialsConnectedToPoint(
int ptindex);
315 MaterialID *GetMaterialsConnectedToPoint(
int ptindex,
int& size);
351inline const C3DPoint *C3DPointList::GetFirst()
const
353 return (
const C3DPoint *)CElementArray::GetFirst();
361inline C3DPoint *C3DPointList::GetFirst()
363 return (
C3DPoint *)CElementArray::GetFirst();
371inline C3DPoint *C3DPointList::ElementAt(
int i)
373 return ((
C3DPoint *)CElementArray::ElementAt(
i));
376inline C3DPoint *C3DPointList::operator[](
int i)
378 return ((
C3DPoint *)CElementArray::operator[](
i));
380inline const C3DPoint *C3DPointList::operator[](
int i)
const
382 return ((
const C3DPoint *)CElementArray::operator[](
i));
385END_MOOTOOLS_NAMESPACE
C3DTPoint template class definition for handling x, y, z 3D point coordinate.
@ CHECKSUM_POINTS
Point position is taken into account (geometry and channel if CHECKSUM_CHANNELS set)
Definition 3DType.h:428
@ CHECKSUM_POINTS_EXTRA
Point flags (geometry and channel if CHECKSUM_CHANNELS set)
Definition 3DType.h:429
AXIS_INFO
Definition 3DType.h:320
POINT_PROPERTIES
Point flags used by any classes that inherit from CPt (C3DPoint, C3DVector...)
Definition Point.h:19
C3DEdge is a class containing 2 point indexes that represent the edge of a face.
Definition FaceList.h:72
C3DPointGridMap is a compact class for retrieving quickly points which are in the same voxel of a pro...
Definition 3DPointList.h:77
double XYZFromIntCoord(int intcoord, int index) const
index: 0, 1 or 2 [x, y or z]
Definition 3DPointList.h:204
static DLL_3DFUNCTION double GetMaxDistance(double threshold, const C3DBBox &bboxCorner)
Return the max distance between two points considered to be equal (returned by Get3DProximityPoints)
double GetMaxDistance(unsigned char XYZ=0) const
Return the max distance between two points when using Get3DProximityPoints (cf note in C3DPointGridMa...
static DLL_3DFUNCTION double GetAbsoluteDistance(double threshold, const C3DBBox &bboxCorner)
Return the absolute distance to use to construct C3DPointGridMap based on a threshold value between 0...
int XYZToIntCoord(double coordinate, int index) const
index: 0, 1 or 2 [x, y or z]
Definition 3DPointList.h:184
Definition 3DPointList.h:267
bool GetNormal(const int *indexes, C3DVector &normal) const
indexes is an array of 3 point indexes
int * Get3DProximityPoints(int index, WeldProximityMap *weldMap, int &size)
Return the point indexes which are close to the given index. The return array should not be freed.
double GetCompacityFactor(const int *indexes) const
indexes is an array of 3 point indexes
bool GetBoundingBox(C3DPoint &min, C3DPoint &max, unsigned int flags=POINT_NONE, bool set=true, C4x4Matrix *matrix=NULL)
Compute AABB bounding box. Points are transformed by matrix if any provided.
bool GetObjectBoundingBox(C3DPoint *bbox8Pts, unsigned int flags=POINT_NONE, bool set=true, C4x4Matrix *matrix=NULL)
Compute OBB bounding box. bbox8Pts are the returned eight corners of the bounding box that are transf...
virtual ~C3DPointList()
Use Delete instead, unless the C3DPointList is created on the stack (take care that it is referenced ...
static C3DPointList * Create(C3DPointList *srcPoints=NULL)
Allocates and creates an empty set of 3d points. Use C3DPointList::Delete to delete it.
virtual unsigned int GetChecksum(unsigned int checksumFlags=CHECKSUM_POINTS|CHECKSUM_POINTS_EXTRA) const
Return a value that is a simple way to check if the geometry changed between two call to the method.
void DeleteWeldMap(WeldProximityMap *map) const
Free the weld map returned by InitWeldMap.
Definition 3DPointList.h:227
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27
This class handles an association between a key and its associated values.
Definition AssociationMap.h:240
ASSOCTYPE * Lookup(const MAPTYPE &entry, int &size) const
Giving a key return an array with the associates data and the number of element in that array.
Definition AssociationMap.h:268
CFaceList is the common base class for a lot of different classes (C3DFaceList, CUVWFaceList....
Definition FaceList.h:179
CGeomInfo is an helper class oftenly required by different methods.
Definition GeomInfo.h:71
Definition InstanciatedObject.h:16
CPointList is the base class for different classes (C3DPointList, CUVWPointList......
Definition PointList.h:50
Definition 3DPointList.h:20