Back to class index
| LineSegment::LineSegmentSyntaxLineSegment::LineSegment(); [1 line of code]The default constructor does not initialize any members of this class. This means that the values of the members a and b are undefined after creating a new LineSegment using this default constructor. Remember to assign to them before use. See AlsoSyntaxLineSegment::LineSegment(const float4 &a, const float4 &b); [4 lines of code]Constructs a line segment through the given end points. See AlsoSyntaxLineSegment::LineSegment(const Ray &ray, float d); [4 lines of code]LineSegment::LineSegment(const Line &line, float d); [4 lines of code] Constructs a line segment from a ray or a line. This constructor takes the ray/line origin position as the starting point of this line segment, and defines the end point of the line segment using the given distance parameter. ParametersfloatdThe distance along the ray/line for the end point of this line segment. This will set b = ray.pos + d * ray.dir as the end point. When converting a ray to a line segment, it is possible to pass in a d value < 0, but in that case the resulting line segment will not lie on the ray. See Also |