FRX SDK Documentation 2025 SP0
Loading...
Searching...
No Matches
Body.h
Go to the documentation of this file.
1//
2// (C) Copyright 2005-2024 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18
19#include "Entity.h"
20#include "Interval3d.h"
21#include "Point3d.h"
22
23class Vector3d;
24class Surface;
25class Vertex;
26class Plane;
27class Line3d;
28class Edge;
29class Face;
30class Circle3d;
31class Curve;
32class Transf3d;
37class MorphingMap;
42
43class ARX_API Body : public Entity
44{
45public:
46 Body( Body const& );
47 Body( void );
48 bool containsNonManifoldEdges( void )const;
49 bool isNegated( void )const;
50 bool isNull( void )const;
51 bool isValid( int )const;
53 bool planeIntersectsBody( Plane const& )const;
54 bool slice( Plane const&, std::vector< Point3d, std::allocator< Point3d> >&, std::vector<int, std::allocator<int> >& )const;
55 Body& align( Point3d const&, Point3d const&, Point3d const&, Point3d const&, Point3d const&, Point3d const& );
56 Body& align( Point3d const&, Vector3d const&, Point3d const&, Vector3d const& );
57 Body& align( Point3d const&, Vector3d const&, Vector3d const&, Point3d const&, Vector3d const&, Vector3d const& );
58 Body& mirror( Plane const& );
59 Body& negate( void );
60 Body& operator*=( Body const& );
62 Body& operator+=( Body const& );
63 Body& operator-=( Body const& );
64 Body& operator-=( Plane const& );
65 Body& operator=( Body const& );
66 Body& rotate( Line3d const&, double );
67 Body& scale( Point3d const&, Vector3d const& );
68 Body& scale( Point3d const&, double );
69 Body& stretch( Line3d const& );
72 Body* next( void )const;
73 Body* pickBody( Point3d const&, double, HideIntegerTransform const& )const;
76 Body convexHull( void )const;
77 Body copy( void )const;
80 Body operator*( Body const& );
82 Body operator+( Body const& );
83 Body operator-( Body const& );
84 Body operator-( Plane const& );
85 Body operator-( void );
86 Curve* curveList( void )const;
87 Edge* pickEdge( Point3d const&, double, HideIntegerTransform const&, Body** )const;
88 Face* faceList( void )const;
89 Face* pickFace( Point3d const&, double, HideIntegerTransform const&, Body** )const;
90 Interval3d const& interval( double )const;
92 Surface* surfaceList( void )const;
93 Vertex* pickVertex( Point3d const&, double, HideIntegerTransform const&, Body** )const;
94 Vertex* vertexList( void )const;
95 double volume( void )const;
102 RayBodyIntersection rayIntersection( Line3d const&, double, Entity*&, double& )const;
103 int curveCount( void )const;
104 int edgeCount( void )const;
105 int faceCount( void )const;
106 int surfaceCount( void )const;
107 int triangleCount( void )const;
108 int vertexCount( void )const;
109 static Body axisRevolution( Point3d const* const, PolygonVertexData** const, int, Vector3d const&, Line3d const&, double, int );
110 //static Body axisRevolution( Point3d const* const, PolygonVertexData** const, int, Vector3d const&, Line3d const&, double, int, Point3d const&, double, double );
111 static Body box( Point3d const&, Vector3d const& );
112 static Body cone( Line3d const&, Vector3d const&, double, double, int );
113 static Body cone( Line3d const&, double, double, int );
114 static Body convexHull( Point3d const* const, int );
115 static Body cylinder( Line3d const&, Vector3d const&, double, int );
116 static Body cylinder( Line3d const&, double, int );
117 static Body endpointRevolution( Point3d const* const, PolygonVertexData** const, int, Vector3d const&, double, int );
118 static Body extrusion( Point3d const* const, PolygonVertexData** const, int, Vector3d const&, Vector3d const& );
119 //static Body extrusion( Point3d const* const, PolygonVertexData** const, int, Vector3d const&, Vector3d const&, Point3d const&, double, double );
120 //static Body extrusion( Point3d const* const, PolygonVertexData** const, int, Vector3d const&, Vector3d const&, std::vector<void*, std::allocator<void* > > const* );
121 static Body extrusionAlongPath( Body const&, Body const&, Point3d const* const, PolygonVertexData** const, int, bool, bool, Point3d const&, double, double, MorphingMap const&, bool, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> > );
122 static Body pipe( Line3d const&, Vector3d const&, double, double, int );
123 static Body pipe( Line3d const&, double, double, int );
124 static Body pipeConic( Line3d const&, Vector3d const&, double, double, double, double, int );
125 static Body pipeConic( Line3d const&, double, double, double, double, int );
126 static Body pyramid( Point3d const* const, PolygonVertexData** const, int, Vector3d const&, Point3d const& );
127 static Body rectangleToCircleReducer( Point3d const&, Vector2d const&, Circle3d const&, int );
128 static Body reducingElbow( Point3d const&, Point3d const&, Point3d const&, double, double, int, int );
130 static Body restore( _iobuf* );
131 static Body restore( wchar_t const* );
132 static Body skin( Body** const, int, bool, bool, MorphingMap**, bool, bool );
133 static Body sphere( Point3d const&, double, int );
134 static Body tetrahedron( Point3d const&, Point3d const&, Point3d const&, Point3d const& );
135 static Body torus( Line3d const&, double, double, int, int );
136 static Body torus_extension( Line3d const&, double, double, int, int );
137 virtual ~Body( void );
138 void __autoclassinit2( unsigned __int64 );
139 void addCurve( Curve* );
140 void addFace( Face* );
143 void changeVertexCoordinates( Vertex** const, Point3d* const, int, bool );
144// void classifyLineSegment( Point3d const&, Point3d const&, std::vector< Point3d, std::allocator< Point3d> >&, std::vector< PointInBodyLocation, std::allocator< PointInBodyLocation> >& );
146 void convertToTerrainBody( double, bool, std::vector< Face*, std::allocator< Face* > >& );
147 void copyGeomFrom( Body const&, Transf3d const& );
148 void decomposeIntoLumps( std::vector< Body*, std::allocator< Body* > >& );
149 void deleteEmptyFaces( void );
150 void deleteFace( Face* );
151 void deleteFaceIntervals( void )const;
153 void deleteMarkedCurves( unsigned int );
154 void deleteMarkedFaces( unsigned int );
155 void deleteMarkedSurfaces( unsigned int );
156 void deleteMarkedVertices( unsigned int );
158 void deleteVertexSurfaceData( void )const;
159 void evaluateVertexSurfaceData( void )const;
160 void generateUnspecifiedSurfaces( double, int );
162 void getAllEdgesReferencingVertex( Vertex const*, std::vector< Edge*, std::allocator< Edge* > >& )const;
163 void getPhysicalEdgesAndVertices( bool, bool, std::vector< Edge*, std::allocator< Edge* > >&, std::vector< Vertex*, std::allocator< Vertex* > >& );
165 void hideDisplayDxf( Transf3d const&, wchar_t const*, bool, HiddenLineDrawingImprove );
166 void init( bool );
167 void makeArcTessellationsInExtrusionsCoincide( Body const&, Vector3d const&, bool&, bool& );
168 void massProperties( double&, double&, Point3d&, Point3d&, Point3d& )const;
171 void mergeEqualSurfaces( void );
172 void modified( void );
173 void moveFace( Face*, Vector3d const&, bool, bool, Face*& );
174 void print( _iobuf* )const;
175 void removeFace( Face* );
177 void save( _iobuf* )const;
178 void save( wchar_t const* )const;
179 void saveToSat( SaveToSatCallback*, bool )const;
180 void saveToSat( _iobuf*, bool )const;
181 void saveToSat( wchar_t const*, bool )const;
182 void section( Plane const&, bool );
183 void section( Plane const&, Point3d const&, bool );
184 void setAEFAndBEFFlags( bool );
185 void setAEFAndBEFFlags( void );
187// void setCurveFlags( OnOff, unsigned int )const;
189// void setEdgeFlags( OnOff, unsigned int )const;
190// void setFaceFlags( OnOff, unsigned int )const;
193 void setInterval( Interval3d const& );
194 void setNext( Body* );
195// void setSurfaceFlags( OnOff, unsigned int )const;
197// void setVertexFlags( OnOff, unsigned int )const;
199 void stitchFaces( bool, bool, bool );
202 void triangulateDxf( wchar_t const*, TriangulationType, bool )const;
204
205};
TriangulationType
PointInBodyLocation
BoolOperType
Definition Global_Enums.h:4
Color
HiddenLineDrawingImprove
HiddenLinesDisplay
BodyInterferenceType
RayBodyIntersection
Definition Body.h:44
void init(bool)
int vertexCount(void) const
void setHiddenLineParams(HiddenLinesDisplay, bool, bool)
static Body axisRevolution(Point3d const *const, PolygonVertexData **const, int, Vector3d const &, Line3d const &, double, int)
void triangulate(OutputTriangleCallback *, TriangulationType, bool) const
void setFaceList(Face *)
void addSurface(Surface *)
int surfaceCount(void) const
static Body pipeConic(Line3d const &, Vector3d const &, double, double, double, double, int)
void triangulateFace(Face *)
Body operator+(Body const &)
Body convexHull(void) const
bool isNegated(void) const
PointInBodyLocation contains(Point3d const &) const
static Body tetrahedron(Point3d const &, Point3d const &, Point3d const &, Point3d const &)
Body & align(Point3d const &, Vector3d const &, Vector3d const &, Point3d const &, Vector3d const &, Vector3d const &)
Interval3d const & interval(double) const
static Body pipe(Line3d const &, Vector3d const &, double, double, int)
void stitchFaces(bool, bool, bool)
Curve * curveList(void) const
Body & align(Point3d const &, Vector3d const &, Point3d const &, Vector3d const &)
static Body torus(Line3d const &, double, double, int, int)
BodyInterferenceType interfere(Body const &) const
static Body pipe(Line3d const &, double, double, int)
Body & transform(Transf3d const &)
static Body restore(_iobuf *)
Face * faceList(void) const
bool mergeCoincidentVertices(void)
void saveToSat(wchar_t const *, bool) const
RayBodyIntersection rayIntersection(Line3d const &, double, Entity *&, double &) const
Body & operator-=(Body const &)
void setAEFAndBEFFlags(void)
void setAEFAndBEFFlags(bool)
void print(_iobuf *) const
void evaluateVertexSurfaceData(void) const
void deleteMarkedSurfaces(unsigned int)
void hideDisplayDxf(Transf3d const &, wchar_t const *, bool, HiddenLineDrawingImprove)
RayBodyIntersection rayIntersection(Line3d const &, double, Entity *&) const
void addFace(Face *)
void setInterval(Interval3d const &)
Body operator-(Plane const &)
bool isValid(int) const
static Body restore(wchar_t const *)
static Body cylinder(Line3d const &, Vector3d const &, double, int)
static Body extrusion(Point3d const *const, PolygonVertexData **const, int, Vector3d const &, Vector3d const &)
void deleteMarkedCurves(unsigned int)
int triangleCount(void) const
Body & align(Point3d const &, Point3d const &, Point3d const &, Point3d const &, Point3d const &, Point3d const &)
void changeVertexCoordinates(Vertex **const, Point3d *const, int, bool)
int edgeCount(void) const
int faceCount(void) const
Body & operator-=(Plane const &)
static Body torus_extension(Line3d const &, double, double, int, int)
void setCurveList(Curve *)
Body & operator+=(Body const &)
Vertex * vertexList(void) const
void saveToSat(SaveToSatCallback *, bool) const
Body & operator*=(Transf3d const &)
Body copy(void) const
static Body sphere(Point3d const &, double, int)
void makeArcTessellationsInExtrusionsCoincide(Body const &, Vector3d const &, bool &, bool &)
static Body convexHull(Point3d const *const, int)
static Body cone(Line3d const &, double, double, int)
Body & stretch(Line3d const &)
Face * pickFace(Point3d const &, double, HideIntegerTransform const &, Body **) const
Body & operator*=(Body const &)
void getPhysicalEdgesAndVertices(bool, bool, std::vector< Edge *, std::allocator< Edge * > > &, std::vector< Vertex *, std::allocator< Vertex * > > &)
void save(SaveRestoreCallback *) const
void setVertexList(Vertex *)
void deleteVertexSurfaceData(void) const
Body & rotate(Line3d const &, double)
void addCurve(Curve *)
void deleteFaceIntervals(void) const
void decomposeIntoLumps(std::vector< Body *, std::allocator< Body * > > &)
static Body cone(Line3d const &, Vector3d const &, double, double, int)
void modified(void)
static Body pyramid(Point3d const *const, PolygonVertexData **const, int, Vector3d const &, Point3d const &)
static Body restore(SaveRestoreCallback *)
void triangulateDxf(wchar_t const *, TriangulationType, bool) const
Body & negate(void)
static Body pipeConic(Line3d const &, double, double, double, double, int)
Body(void)
static Body rectangleToCircleReducer(Point3d const &, Vector2d const &, Circle3d const &, int)
Body operator*(Transf3d const &)
Body & scale(Point3d const &, double)
void section(Plane const &, Point3d const &, bool)
void hideDisplay(Transf3d const &, OutputPolylineCallback *, bool, HiddenLineDrawingImprove, HideIntegerTransform *)
Body * next(void) const
Body & mirror(Plane const &)
Body operator-(Body const &)
BodyInterferenceType operator&&(Body const &) const
void setNext(Body *)
static Body box(Point3d const &, Vector3d const &)
double volume(void) const
bool isNull(void) const
Body operator*(Body const &)
void mergeEqualSurfaces(void)
void deleteEmptyFaces(void)
int curveCount(void) const
void generateUnspecifiedSurfacesFromApproxEdges(int)
bool planeIntersectsBody(Plane const &) const
void getAllEdgesReferencingVertex(Vertex const *, std::vector< Edge *, std::allocator< Edge * > > &) const
Body & operator=(Body const &)
Body * pickBody(Point3d const &, double, HideIntegerTransform const &) const
void setColor(Color)
void deleteMarkedFaces(unsigned int)
static Body endpointRevolution(Point3d const *const, PolygonVertexData **const, int, Vector3d const &, double, int)
static Body skin(Body **const, int, bool, bool, MorphingMap **, bool, bool)
void copyGeomFrom(Body const &, Transf3d const &)
virtual ~Body(void)
void save(wchar_t const *) const
void triangulateAllFaces(void)
static Body reducingElbow(Point3d const &, Point3d const &, Point3d const &, double, double, int, int)
void removeFace(Face *)
Point3d closestPointOnBody(Point3d, Entity *&) const
void moveFace(Face *, Vector3d const &, bool, bool, Face *&)
Body(Body const &)
Body & scale(Point3d const &, Vector3d const &)
Body extractFace(Face *)
void deleteFace(Face *)
void save(_iobuf *) const
void cleanUpNonManifoldEdgesAndCoincidentFaces(void)
void mergeCoplanarFaces(Edge *)
Vertex * pickVertex(Point3d const &, double, HideIntegerTransform const &, Body **) const
void saveToSat(_iobuf *, bool) const
bool containsNonManifoldEdges(void) const
void deleteMarkedVertices(unsigned int)
void massProperties(double &, double &, Point3d &, Point3d &, Point3d &) const
Edge * pickEdge(Point3d const &, double, HideIntegerTransform const &, Body **) const
bool slice(Plane const &, std::vector< Point3d, std::allocator< Point3d > > &, std::vector< int, std::allocator< int > > &) const
void convertToTerrainBody(double, bool, std::vector< Face *, std::allocator< Face * > > &)
void deleteFaceIntervalsAndPlanes(void) const
void __autoclassinit2(unsigned __int64)
void deleteUnusedVerticesSurfacesCurves(void)
PointInBodyLocation contains(Point3d const &, Entity *&) const
void generateUnspecifiedSurfaces(double, int)
Body extractShell(Face *)
void setSurfaceList(Surface *)
void addVertex(Vertex *)
Body operator-(void)
void mergeCoplanarEntities(bool, bool, TopologyChangeCallback *)
Body & translate(Vector3d const &)
PointInBodyLocation operator&&(Point3d const &) const
Body combine(Body &)
Surface * surfaceList(void) const
static Body cylinder(Line3d const &, double, int)
void section(Plane const &, bool)
static Body extrusionAlongPath(Body const &, Body const &, Point3d const *const, PolygonVertexData **const, int, bool, bool, Point3d const &, double, double, MorphingMap const &, bool, std::vector< int, std::allocator< int > >, std::vector< int, std::allocator< int > >)
Body boolOper(Body &, BoolOperType, bool, TopologyChangeCallback *, bool)
Definition Curve.h:25
Definition Edge.h:31
Definition Face.h:32
Definition Plane.h:25