25 public Vector2[]
corners =
new Vector2[4];
29 public Label leftLabel;
30 public Label rightLabel;
41 public Label(
float y,
float x, Vector3 v,
int p,
float a, GameObject annoPoint)
53 this.annotationPoint = annoPoint;
70 if (!
float.IsNaN(this.
position.x) && !
float.IsNaN(
this.position.y) && !float.IsNaN(this.position.z))
75 lm.newPos = this.position;
88 float width = annotationLabel.GetComponent<RectTransform>().rect.width *
annotationLabel.transform.parent.localScale.x *
annotationLabel.GetComponent<RectTransform>().localScale.x * meshNode.transform.localScale.x * meshPositionNode.transform.localScale.x * meshViewerBase.transform.localScale.x;
89 float height = annotationLabel.GetComponent<RectTransform>().rect.height *
annotationLabel.transform.parent.localScale.x *
annotationLabel.GetComponent<RectTransform>().localScale.x * meshNode.transform.localScale.x * meshPositionNode.transform.localScale.x * meshViewerBase.transform.localScale.x;
143 annotationLabel.GetComponent<RectTransform>().localScale =
new Vector3(labelscale / meshScale, labelscale / meshScale, labelscale / meshScale);
162 float a = (height / 2) + Mathf.Sqrt((height / 4) + (width / 4));
163 float b = Mathf.Sqrt(a * (height / 2));
164 float epsilon = (width / (a * 2));
171 float phi = 270 -
angle;
172 phi = Mathf.Deg2Rad * phi;
174 float r = b / (Mathf.Sqrt(1 - epsilon * epsilon * Mathf.Cos(phi) * Mathf.Cos(phi)));
182 float phi = 360 + (270 -
angle);
183 phi = Mathf.Deg2Rad * phi;
185 float r = b / (Mathf.Sqrt(1 - epsilon * epsilon * Mathf.Cos(phi) * Mathf.Cos(phi)));
204 weight = weightAngleSizeRatio * angleSize;
float[] angleToLeftAndRightCorner
void calculateCornersOnPlane(GameObject meshNode, GameObject meshPositionNode, GameObject meshViewerBase)
hier werden die Positionen der Ecken eines Annotationlabel berechnet
GameObject annotationLabel
void calculateAngleToLeftAndRight(Vector3 xdirection, Vector3 ydirection, Vector3 planeOrigin)
hier wird berechnet welchen Abstand in Grad die linke und rechte Ecke zum Mittelpunkt der Labels hat ...
Label(float y, float x, Vector3 v, int p, float a, GameObject annoPoint)
Hat einen int Parameter.
GameObject annotationPoint
void moveToNewPosition()
Hier wird das GameObject Annotationlabel an eine neue position verschoben.
float calculateOffset()
Offset berechnung.
void adaptLabelToZooming(float meshScale, float labelscale)
hier wird das Annotationlabel an das Zoomen des Nutzers angepasst
void calculateWeight(float weightAngleSizeRatio)
Gewichtsberechnung.