Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
None.
Purpose:
TGLines are line segments in 3-D space, and are defined by two endpoints. Line segments have an implied direction that moves from the starting point to the end point.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None. Do not create derived classes.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TGLine3D ()
- TGLine3D (const TGPoint3D & point0, const TGPoint3D & point1)
- TGLine3D (const TGLine3D & Line)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a line segment connecting the specified points.
- Copy constructor.
Calling Context:
- Called by the stream-in operators. You can also call this function directly and set the endpoints later.
- Call this function directly.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TGPoint3D & point0 -The starting point.
- const TGPoint3D & point1 -The end point.
- const TGLine3D & Line -The line to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
~ TGLine3D ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::GetPoints
void GetPoints (TGPoint3D & point0, TGPoint3D & point1) const
Interface Category:
API.
Purpose:
Returns, in its arguments, both endpoints of the line segment.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::GetStartPoint
TGPoint3D GetStartPoint () const
Interface Category:
API.
Purpose:
Returns the starting point of the line segment.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the starting point of the line segment.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::GetEndPoint
TGPoint3D GetEndPoint () const
Interface Category:
API.
Purpose:
Returns the end point of the line segment.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the end point of the line segment.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::SetStartPoint
void SetStartPoint (const TGPoint3D & p)
Interface Category:
API.
Purpose:
Sets the starting point of the line segment.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::SetEndPoint
void SetEndPoint (const TGPoint3D & p)
Interface Category:
API.
Purpose:
Sets the end point of the line segment.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::GetBounds
TGBox3D GetBounds () const
Interface Category:
API.
Purpose:
Returns the line segment's bounding box (the smallest TGBox3D that encloses the line segment).
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the bounding box.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::DragPosition
void DragPosition (GParametric u, const TGPoint3D & p)
Interface Category:
API.
Purpose:
Moves the line so the specified parametric position on the line matches the specified point.
Calling Context:
Call this function directly.
Parameters:
- GParametric u -The parametric position on the line.
- const TGPoint3D & p -The point to match.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::Evaluate
TGPoint3D Evaluate (GParametric u) const
Interface Category:
API.
Purpose:
Returns the point corresponding to the parameter. A value of 0 corresponds to the starting point, and 1 to the end point. Values outside the range return an extrapolated point.
Calling Context:
Call this function directly.
Parameters:
- GParametric u -The parametric position on the line.
Return Value:
Returns the point corresponding to the parameter u.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::Length
GCoordinate Length () const
Interface Category:
API.
Purpose:
Returns the length of the line segment.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the length of the line segment.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::NearestParametric
GParametric NearestParametric (const TGPoint3D & p) const
Interface Category:
API.
Purpose:
Finds the parametric value corresponding to the point on the line segment that is nearest to the specified point.
Calling Context:
Call this function directly.
Parameters:
- const TGPoint3D & p -The point whose parametric value is to be found.
Return Value:
Returns the parametric value that best matches the specified point.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::Intersects
bool Intersects (const TGBox3D & box) const
Interface Category:
API.
Purpose:
Specifies whether the line intersects the given box.
Calling Context:
Call this function directly.
Parameters:
- const TGBox3D & box -The box to be tested.
Return Value:
Returns true if the line intersects the box.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::TransformBy
void TransformBy (const TGrafMatrix3D & xform)
Interface Category:
API.
Purpose:
Transforms the line segment by the specified transformation matrix.
Calling Context:
Call this function directly.
Parameters:
- const TGrafMatrix3D & xform -The transformation matrix to be applied to the line segment.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::operator<<=
TStream & operator <<= (TStream & fromwhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromwhere -The stream from which the object's data is streamed in.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::operator>>=
TStream & operator >>=(TStream & towhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & towhere -The stream to which the object's data is streamed out.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::operator=
TGLine3D & operator =(const TGLine3D & Src)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
- const TGLine3D & Src -The line whose value is copied.
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::operator==
bool operator ==(const TGLine3D & Src) const
Interface Category:
API.
Purpose:
Tests two line segments for equality.
Calling Context:
Call this function by using the operator in an expression.
Parameters:
- const TGLine3D & Src -The line segment to be compared to this line segment.
Return Value:
Returns true if both endpoints of one line segment are equal to the corresponding endpoints of the other line segment.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGLine3D::operator!=
bool operator != (const TGLine3D & Src) const
Interface Category:
API.
Purpose:
Tests two line segments for inequality.
Calling Context:
Call this function by using the operator in an expression.
Parameters:
- const TGLine3D & Src -The line segment to be compared to this line segment.
Return Value:
Returns true if either endpoint of one line segment is different from the corresponding endpoint of the other line segment.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.