MCPcopy Create free account
hub / github.com/carbonengine/trinity / AddCurvedLineCrt

Method AddCurvedLineCrt

trinity/Tr2CurveLineSet.cpp:758–778  ·  view source on GitHub ↗

------------------------------------------------------------- Description: Adds a curved line (based on splines) to the line set using cartesian coordinates, but does not submit it Arguments: startPosition - The start position of the line startColor - The color of the line at start position endPosition - The end position of the line endColor - The color of the line at end position middle - The cen

Source from the content-addressed store, hash-verified

756// The line's id
757// -------------------------------------------------------------
758unsigned int Tr2CurveLineSet::AddCurvedLineCrt( const Vector3& position1, const Vector4& color1, const Vector3& position2, const Vector4& color2, const Vector3& middle, float width, Be::OptionalWithDefaultValue<int, 20> segments )
759{
760 LineData newLine;
761
762 newLine.type = LINETYPE_CURVED;
763 newLine.position1 = position1;
764 newLine.color1 = color1;
765 newLine.position2 = position2;
766 newLine.color2 = color2;
767 newLine.intermediatePosition = middle;
768 newLine.width = width;
769 newLine.multiColor = Color( 0.f, 0.f, 0.f, 0.f );
770 newLine.multiColorBorder = -1.f;
771 newLine.overlayColor = Color( 0.f, 0.f, 0.f, 0.f );
772 newLine.animationSpeed = 0.f;
773 newLine.animationScale = 1.f;
774 newLine.numOfSegments = segments > 0 ? segments.GetValue() : 1;
775
776 // use helper function to put this line in list
777 return addLineData( &newLine );
778}
779
780// -------------------------------------------------------------
781// Description:

Callers 1

AddCurvedLineMethod · 0.80

Calls 1

GetValueMethod · 0.45

Tested by

no test coverage detected