CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
OdGeSphere Class Reference

#include <GeSphere.h>

Inheritance diagram for OdGeSphere:
OdGeSurface OdGeEntity3d OdGsCullingBSphere

Public Member Functions

 OdGeSphere ()
 
 OdGeSphere (double radius, const OdGePoint3d &center)
 
 OdGeSphere (double radius, const OdGePoint3d &center, const OdGeVector3d &northAxis, const OdGeVector3d &refAxis, double startAngleU, double endAngleU, double startAngleV, double endAngleV)
 
 OdGeSphere (const OdGeSphere &sphere)
 
double radius () const
 
OdGePoint3d center () const
 
void getAnglesInU (double &startAngleU, double &endAngleU) const
 
void getAnglesInV (double &startAngleV, double &endAngleV) const
 
OdGeVector3d northAxis () const
 
OdGeVector3d refAxis () const
 
OdGePoint3d northPole () const
 
OdGePoint3d southPole () const
 
bool isOuterNormal () const
 
bool isClosed (const OdGeTol &tol=OdGeContext::gTol) const
 
OdGeSpheresetRadius (double radius)
 
OdGeSpheresetAnglesInU (double startAngleU, double endAngleU)
 
OdGeSpheresetAnglesInV (double startAngleV, double endAngleV)
 
OdGeSphereset (double radius, const OdGePoint3d &center)
 
OdGeSphereset (double radius, const OdGePoint3d &center, const OdGeVector3d &northAxis, const OdGeVector3d &refAxis, double startAngleU, double endAngleU, double startAngleV, double endAngleV)
 
OdGeSphereoperator= (const OdGeSphere &sphere)
 
bool intersectWith (const OdGeLinearEnt3d &lineEnt, int &numInt, OdGePoint3d &p1, OdGePoint3d &p2, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isReverseV () const
 
void setReverseV (bool isReverseV)
 
- Public Member Functions inherited from OdGeSurface
OdGePoint2d paramOf (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint2d paramOf (const OdGePoint3d &point, const OdGeUvBox *uvBox, const OdGeTol &tol=OdGeContext::gTol) const
 
 TD_USING (OdGeEntity3d::isOn)
 
bool isOn (const OdGePoint3d &point, OdGePoint2d &paramPoint, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint3d closestPointTo (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint3d closestPointTo (const OdGePoint3d &point, OdGePoint2d *param, const OdGeUvBox *uvBox, const OdGeTol &tol=OdGeContext::gTol) const
 
void getClosestPointTo (const OdGePoint3d &point, OdGePointOnSurface &pntOnSurface, const OdGeTol &tol=OdGeContext::gTol) const
 
double distanceTo (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isNormalReversed () const
 
bool isLeftHanded () const
 
OdGeSurfacereverseNormal ()
 
void getEnvelope (OdGeInterval &intrvlU, OdGeInterval &intrvlV) const
 
void getEnvelope (OdGeUvBox &uvbox) const
 
bool isClosedInU (const OdGeTol &tol=OdGeContext::gTol) const
 
bool isClosedInV (const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint3d evalPoint (const OdGePoint2d &param) const
 
OdGePoint3d evalPoint (const OdGePoint2d &param, int numDeriv, OdGeVector3dArray &derivatives) const
 
OdGePoint3d evalPoint (const OdGePoint2d &param, int numDeriv, OdGeVector3dArray &derivatives, OdGeVector3d &normal) const
 
OdGeSurfaceoperator= (const OdGeSurface &surf)
 
OdGeExtents3d getGeomExtents (const OdGeUvBox &range=OdGeUvBox(), const OdGeMatrix3d *coordSystem=NULL) const
 
bool project (const OdGePoint3d &p, OdGePoint3d &projP, const OdGeTol &tol=OdGeContext::gTol) const
 
bool setEnvelope (const OdGeInterval &realIntrvlU, const OdGeInterval &realIntrvlV)
 
OdGeCurve3dmakeIsoparamCurve (bool byU, double param) const
 
OdGeCurve3dmakeIsoparamCurve (bool byU, double param, const OdGeInterval &interval) const
 
bool getPoles (OdGeDoubleArray *uParams, OdGeDoubleArray *vParams, OdGePoint3dArray *uPoints, OdGePoint3dArray *vPoints, double tol=1e-13) const
 
- Public Member Functions inherited from OdGeEntity3d
 ODRX_HEAP_OPERATORS ()
 
 ~OdGeEntity3d ()
 
bool isKindOf (OdGe::EntityId entType) const
 
OdGe::EntityId type () const
 
OdGeEntity3dcopy () const
 
OdGeEntity3doperator= (const OdGeEntity3d &entity)
 
bool operator== (const OdGeEntity3d &entity) const
 
bool operator!= (const OdGeEntity3d &entity) const
 
bool isEqualTo (const OdGeEntity3d &object, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGeEntity3dtransformBy (const OdGeMatrix3d &xfm)
 
OdGeEntity3dtranslateBy (const OdGeVector3d &translateVec)
 
OdGeEntity3drotateBy (double angle, const OdGeVector3d &vect, const OdGePoint3d &basePoint=OdGePoint3d::kOrigin)
 
OdGeEntity3dmirror (const OdGePlane &plane)
 
OdGeEntity3dscaleBy (double scaleFactor, const OdGePoint3d &basePoint=OdGePoint3d::kOrigin)
 
bool isOn (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
 

Additional Inherited Members

- Protected Member Functions inherited from OdGeSurface
 OdGeSurface ()
 
 OdGeSurface (const OdGeSurface &surf)
 
- Protected Member Functions inherited from OdGeEntity3d
 OdGeEntity3d ()
 
 OdGeEntity3d (const OdGeEntity3d &)
 
void connectTo (OdGeEntity3dImpl *)
 

Detailed Description

This class represents spheres.

Remarks
A sphere is defined by its radius center northAxis refAxis

northAxis defines the direction from the center to the north pole.

refAxis, a vector orthogonal to northAxis, the prime meridian.

Latitude is defined by the U parameter, which defaults to [-OdaPI/2, OdaPI/2] for closed spheres. The lower bound maps to the south pole, zero maps to the equator, and the upper bound maps to the north pole.

Longitude is defined by the V parameter, which defaults to [-OdaPI, OdaPI) for closed spheres. Zero corresponds to the meridian defined by the refAxis of this sphere. Applying the right hand rule along the northAxis defines the increasing direction for V. However, if isReverseV() is true, the increasing direction for V is defined by the left hand rule.

The sphere is periodic in V with a period of Oda2PI.

[umin, umax] by [vmin, vmax] defines a spherical patch with 4 sides bounded by 2 longitudinal arcs and 2 latitudinal arcs.

The following constraints apply when defining a patch.

umin < umax and |umin - umax| <= OdaPI. vmin < vmax and |vmin - vmax| <= Oda2PI.

Corresponding C++ library: TD_Ge

<group OdGe_Classes>

See also
<link ge_OdGeSphere, Working with Spheress>

Definition at line 73 of file GeSphere.h.

Constructor & Destructor Documentation

◆ OdGeSphere() [1/4]

OdGeSphere::OdGeSphere ( )

Default constructor for the OdGeSphere class.

Remarks
Constructs a default sphere that is located at the origin of world coordinates and with 1.0 radius.

◆ OdGeSphere() [2/4]

OdGeSphere::OdGeSphere ( double  radius,
const OdGePoint3d center 
)

Constructor for the OdGeSphere class.

Parameters
radius[in] The radius of this sphere.
center[in] The origin of the this sphere.

◆ OdGeSphere() [3/4]

OdGeSphere::OdGeSphere ( double  radius,
const OdGePoint3d center,
const OdGeVector3d northAxis,
const OdGeVector3d refAxis,
double  startAngleU,
double  endAngleU,
double  startAngleV,
double  endAngleV 
)

Constructor for the OdGeSphere class.

Parameters
radius[in] The radius of this sphere.
center[in] The origin of the this sphere.
northAxis[in] the direction to the north pole.
refAxis[in] the direction to the prime meridian.
startAngleU[in] Starting longitude which is defined by a U parameter. To create a closed sphere, set this parameter to -OdaPI/2 and endAngleU to OdaPI/2.
endAngleU[in] Ending longitude which is defined by a U parameter. To create a closed sphere, set this parameter to OdaPI/2 and startAngleU to -OdaPI/2.
startAngleV[in] Starting latitude which is defined by a V parameter. To create a closed sphere, set this parameter to -OdaPI and endAngleV to OdaPI.
endAngleV[in] Ending latitude which is defined by a V parameter. To create a closed sphere, set this parameter to -OdaPI and endAngleV to OdaPI.
Remarks
All angles are expressed in radians.

◆ OdGeSphere() [4/4]

OdGeSphere::OdGeSphere ( const OdGeSphere sphere)

Copy constructor for the OdGeSphere class.

Parameters
sphere[in] Sphere to be copied.

Member Function Documentation

◆ center()

OdGePoint3d OdGeSphere::center ( ) const

Returns the center of this sphere.

Returns
The center of this sphere as an OdGePoint3d instance.

◆ getAnglesInU()

void OdGeSphere::getAnglesInU ( double &  startAngleU,
double &  endAngleU 
) const

Retrieves the start and end longitude.

Parameters
startAngleU[out] Receives the start longitude.
endAngleU[out] Receives the end longitude.

◆ getAnglesInV()

void OdGeSphere::getAnglesInV ( double &  startAngleV,
double &  endAngleV 
) const

Retrieves the start and end latitude.

Parameters
startAngleV[out] Receives the start latitude.
endAngleV[out] Receives the end latitude.

◆ intersectWith()

bool OdGeSphere::intersectWith ( const OdGeLinearEnt3d lineEnt,
int &  numInt,
OdGePoint3d p1,
OdGePoint3d p2,
const OdGeTol tol = OdGeContext::gTol 
) const

Checks if this sphere intersects with a line entity, and returns the number of intersections and the points of intersection.

Parameters
lineEnt[in] Any 3D line entity that is tested for intersection with this sphere.
numInt[out] Receives the number of intersections.
p1[out] Receives the first intersection point.
p2[out] Receives the second intersection point.
tol[in] Geometric tolerance.
Remarks
p1 is valid if and only if numInt >= 1. p2 is valid if and only if numInt = 2.
Returns
true if and only if this sphere intersects with a line entity.

◆ isClosed()

bool OdGeSphere::isClosed ( const OdGeTol tol = OdGeContext::gTol) const

Checks if the equator is a full circle.

Parameters
tol[in] Geometric tolerance.
Returns
true if and only if the equator is full circle.

◆ isOuterNormal()

bool OdGeSphere::isOuterNormal ( ) const

Checks if the normal to this surface is pointing outward.

Returns
true if and only if the normal to this surface is pointing outward.

◆ isReverseV()

bool OdGeSphere::isReverseV ( ) const

Checks whether V parameter is increasing in clockwise direction around northAxis.

Returns
true if V parameter is increasing in clockwise direction around northAxis, false otherwise.

◆ northAxis()

OdGeVector3d OdGeSphere::northAxis ( ) const

Returns the direction to the north pole of this sphere.

Returns
The direction to the north pole of this sphere as an OdGeVector3d instance.

◆ northPole()

OdGePoint3d OdGeSphere::northPole ( ) const

Returns the location of the north pole.

Returns
The north pole of this sphere as an OdGePoint3d instance.

◆ operator=()

OdGeSphere & OdGeSphere::operator= ( const OdGeSphere sphere)

Assignment operator for the OdGeSphere class.

Parameters
sphere[in] Sphere to assign.
Returns
A reference to this OdGeSphere object.

◆ radius()

double OdGeSphere::radius ( ) const

Returns the radius of this sphere.

Returns
Radius of this sphere as a double value.

◆ refAxis()

OdGeVector3d OdGeSphere::refAxis ( ) const

Returns the reference axis of this sphere.

Returns
The reference axis of this sphere as an OdGeVector3d instance.

◆ set() [1/2]

OdGeSphere & OdGeSphere::set ( double  radius,
const OdGePoint3d center 
)

Sets the parameters for this sphere according to the arguments.

Parameters
radius[in] The radius of this sphere.
center[in] The origin of the this sphere.
Returns
A reference to this OdGeSphere object.

◆ set() [2/2]

OdGeSphere & OdGeSphere::set ( double  radius,
const OdGePoint3d center,
const OdGeVector3d northAxis,
const OdGeVector3d refAxis,
double  startAngleU,
double  endAngleU,
double  startAngleV,
double  endAngleV 
)

Sets the parameters for this sphere according to the arguments.

Parameters
radius[in] The radius of this sphere.
center[in] The origin of the this sphere.
northAxis[in] the direction to the north pole.
refAxis[in] the direction to the prime meridian.
startAngleU[in] Starting longitude which is defined by a U parameter. To create a closed sphere, set this parameter to -OdaPI/2 and endAngleU to OdaPI/2.
endAngleU[in] Ending longitude which is defined by a U parameter. To create a closed sphere, set this parameter to OdaPI/2 and startAngleU to -OdaPI/2.
startAngleV[in] Starting latitude which is defined by a V parameter. To create a closed sphere, set this parameter to -OdaPI and endAngleV to OdaPI.
endAngleV[in] Ending latitude which is defined by a V parameter. To create a closed sphere, set this parameter to -OdaPI and endAngleV to OdaPI.
Returns
A reference to this OdGeSphere object.

◆ setAnglesInU()

OdGeSphere & OdGeSphere::setAnglesInU ( double  startAngleU,
double  endAngleU 
)

Sets the starting and ending longitudes.

Parameters
startAngleU[in] Starting longitude which is defined by a U parameter. To create a closed sphere, set this parameter to -OdaPI/2 and endAngleU to OdaPI/2.
endAngleU[in] Ending longitude which is defined by a U parameter. To create a closed sphere, set this parameter to OdaPI/2 and startAngleU to -OdaPI/2.
Returns
A reference to this OdGeSphere object.

◆ setAnglesInV()

OdGeSphere & OdGeSphere::setAnglesInV ( double  startAngleV,
double  endAngleV 
)

Sets the starting and ending latitudes.

Parameters
startAngleV[in] Starting latitude which is defined by a V parameter. To create a closed sphere, set this parameter to -OdaPI and endAngleV to OdaPI.
endAngleV[in] Ending latitude which is defined by V a parameter. To create a closed sphere, set this parameter to -OdaPI and endAngleV to OdaPI.
Returns
A reference to this OdGeSphere object.

◆ setRadius()

OdGeSphere & OdGeSphere::setRadius ( double  radius)

Sets the radius of this sphere.

Parameters
radius[in] The radius of this sphere.
Returns
A reference to this OdGeSphere object.

◆ setReverseV()

void OdGeSphere::setReverseV ( bool  isReverseV)

Specifies whether the V parameter should be measured clockwise around northAxis, rather than counterclockwise.

Parameters
isReverseV[in] Boolean flag that indicates if the V parameter is reversed.

◆ southPole()

OdGePoint3d OdGeSphere::southPole ( ) const

Returns the location of the south pole.

Returns
The south pole of this sphere as an OdGePoint3d instance.

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