Ejemplo n.º 1
0
 /// <summary>
 /// Draw this material line
 /// </summary>
 public override bool Draw(RootElement source, OnRenderEventArgs eventArgs)
 {
     if (FaceToward == Vector3.Zero)
     {
         return(MtaClient.DxDrawMaterialLine3D(StartPosition.X, StartPosition.Y, StartPosition.Z, EndPosition.X, EndPosition.Y, EndPosition.Z, Material?.MaterialElement, Width, Color.Hex, PostGUI));
     }
     else
     {
         return(MtaClient.DxDrawMaterialLine3D(StartPosition.X, StartPosition.Y, StartPosition.Z, EndPosition.X, EndPosition.Y, EndPosition.Z, Material?.MaterialElement, Width, Color.Hex, PostGUI, FaceToward.X, FaceToward.Y, FaceToward.Z));
     }
 }
Ejemplo n.º 2
0
 public static bool DrawMaterialLine3D(Material material, Vector3 startPosition, Vector3 endPosition, Vector3 faceToward, Color color, float width = 1, bool postGui = false)
 {
     return(MtaClient.DxDrawMaterialLine3D(startPosition.X, startPosition.Y, startPosition.Z, endPosition.X, endPosition.Y, endPosition.Z, material?.MaterialElement, color.Hex, (int)width, postGui, faceToward.X, faceToward.Y, faceToward.Z));
 }