add_scene_3d_labelT_add_scene_3d_labelAddScene3dLabelAddScene3dLabeladd_scene_3d_label (Operator)

Name

add_scene_3d_labelT_add_scene_3d_labelAddScene3dLabelAddScene3dLabeladd_scene_3d_label — Hinzufügen eines Labels zu einer 3D-Szene.

Signatur

add_scene_3d_label( : : Scene3D, Text, ReferencePoint, Position, RelatesTo : LabelIndex)

Herror T_add_scene_3d_label(const Htuple Scene3D, const Htuple Text, const Htuple ReferencePoint, const Htuple Position, const Htuple RelatesTo, Htuple* LabelIndex)

void AddScene3dLabel(const HTuple& Scene3D, const HTuple& Text, const HTuple& ReferencePoint, const HTuple& Position, const HTuple& RelatesTo, HTuple* LabelIndex)

Hlong HScene3D::AddScene3dLabel(const HTuple& Text, const HTuple& ReferencePoint, const HTuple& Position, const HTuple& RelatesTo) const

Hlong HScene3D::AddScene3dLabel(const HString& Text, const HTuple& ReferencePoint, const HTuple& Position, const HTuple& RelatesTo) const

Hlong HScene3D::AddScene3dLabel(const char* Text, const HTuple& ReferencePoint, const HTuple& Position, const HTuple& RelatesTo) const

Hlong HScene3D::AddScene3dLabel(const wchar_t* Text, const HTuple& ReferencePoint, const HTuple& Position, const HTuple& RelatesTo) const   (Nur Windows)

static void HOperatorSet.AddScene3dLabel(HTuple scene3D, HTuple text, HTuple referencePoint, HTuple position, HTuple relatesTo, out HTuple labelIndex)

int HScene3D.AddScene3dLabel(HTuple text, HTuple referencePoint, HTuple position, HTuple relatesTo)

int HScene3D.AddScene3dLabel(string text, HTuple referencePoint, HTuple position, HTuple relatesTo)

def add_scene_3d_label(scene_3d: HHandle, text: MaybeSequence[str], reference_point: Sequence[Union[float, int]], position: Sequence[Union[float, int, str]], relates_to: Sequence[str]) -> int

Beschreibung

add_scene_3d_labeladd_scene_3d_labelAddScene3dLabelAddScene3dLabelAddScene3dLabeladd_scene_3d_label fügt ein Label mit dem Inhalt TextTextTextTexttexttext zur 3D-Szene Scene3DScene3DScene3DScene3Dscene3Dscene_3d hinzu und gibt den Index des Labels in LabelIndexLabelIndexLabelIndexLabelIndexlabelIndexlabel_index zurück.

Der Bezugspunkt des Labels wird als [X,Y,Z]-Punkt im Koordinatensystem der 3D-Szene in ReferencePointReferencePointReferencePointReferencePointreferencePointreference_point festgelegt. Es ist möglich, ein Label ohne Bezugspunkt zu erzeugen, indem ein leeres Tupel übergeben wird. Dies ist allerdings nur möglich, wenn RelatesToRelatesToRelatesToRelatesTorelatesTorelates_to auf 'point'"point""point""point""point""point" gesetzt wird (siehe die Beschreibung von RelatesToRelatesToRelatesToRelatesTorelatesTorelates_to weiter unten).

Werden mehrere Texte in TextTextTextTexttexttext als Tupel übergeben, werden mehrere Labels erzeugt. Es ist möglich einen Bezugspunkt für alle Labels oder spezifische Bezugspunkte für jedes Label festzulegen. Das gilt auch für PositionPositionPositionPositionpositionposition und RelatesToRelatesToRelatesToRelatesTorelatesTorelates_to.

Labels können fest in Fensterkoordinaten oder relativ zur Projektion des Bezugspunktes positioniert werden. Dafür werden die beiden Parameter PositionPositionPositionPositionpositionposition und RelatesToRelatesToRelatesToRelatesTorelatesTorelates_to verwendet:

Feste Positionierung

Wird RelatesToRelatesToRelatesToRelatesTorelatesTorelates_to auf 'window'"window""window""window""window""window" gesetzt, wird das Label an einer festen Position im Fenster (bzw. gerenderten Bild) dargestellt, auch wenn sich die Pose der 3D-Szene ändert. Es gibt zwei Möglichkeiten, die Position festzulegen. Es können entweder die [Zeile,Spalte]-Koordinaten der linken oberen Ecke des Labels in PositionPositionPositionPositionpositionposition übergeben werden oder eine der folgenden vordefinierten Positionen:

'top_left'"top_left""top_left""top_left""top_left""top_left" 'top'"top""top""top""top""top" 'top_right'"top_right""top_right""top_right""top_right""top_right"
'left'"left""left""left""left""left" 'center'"center""center""center""center""center" 'right'"right""right""right""right""right"
'bottom_left'"bottom_left""bottom_left""bottom_left""bottom_left""bottom_left" 'bottom'"bottom""bottom""bottom""bottom""bottom" 'bottom_right'"bottom_right""bottom_right""bottom_right""bottom_right""bottom_right"

Relative Positionierung

Wird RelatesToRelatesToRelatesToRelatesTorelatesTorelates_to auf 'point'"point""point""point""point""point" gesetzt, wird das Label an einer Position relativ zur Projektion des Bezugspunkts dargestellt. Auf diese Weise bewegt sich das Label mit dem Bezugspunkt, wenn die Pose der 3D-Szene geändert wird. Es gibt wiederum zwei Möglichkeiten die Position festzulegen. Es kann entweder der Offset (in [Zeile,Spalte]-Koordinaten) der linken oberen Ecke des Labels oder eine der folgenden vordefinierten Positionen in PositionPositionPositionPositionpositionposition übergeben werden:

'top_left'"top_left""top_left""top_left""top_left""top_left" 'top'"top""top""top""top""top" 'top_right'"top_right""top_right""top_right""top_right""top_right"
'left'"left""left""left""left""left" 'center'"center""center""center""center""center" 'right'"right""right""right""right""right"
'bottom_left'"bottom_left""bottom_left""bottom_left""bottom_left""bottom_left" 'bottom'"bottom""bottom""bottom""bottom""bottom" 'bottom_right'"bottom_right""bottom_right""bottom_right""bottom_right""bottom_right"

Mit set_scene_3d_label_paramset_scene_3d_label_paramSetScene3dLabelParamSetScene3dLabelParamSetScene3dLabelParamset_scene_3d_label_param können diese und andere Parameter wie z.B. Farbe und Schriftart des Labels verändert werden.

Ausführungsinformationen

Parameter

Scene3DScene3DScene3DScene3Dscene3Dscene_3d (input_control)  scene_3d HScene3D, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle der 3D-Szene.

TextTextTextTexttexttext (input_control)  string(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Text des Labels.

Defaultwert: 'label' "label" "label" "label" "label" "label"

ReferencePointReferencePointReferencePointReferencePointreferencePointreference_point (input_control)  point-array HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Bezugspunkt des Labels.

Parameteranzahl: 3

PositionPositionPositionPositionpositionposition (input_control)  point-array HTupleSequence[Union[float, int, str]]HTupleHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong)

Position im Fenster

Defaultwert: 'top' "top" "top" "top" "top" "top"

Werteliste: 'bottom'"bottom""bottom""bottom""bottom""bottom", 'bottom_left'"bottom_left""bottom_left""bottom_left""bottom_left""bottom_left", 'bottom_right'"bottom_right""bottom_right""bottom_right""bottom_right""bottom_right", 'center'"center""center""center""center""center", 'left'"left""left""left""left""left", 'right'"right""right""right""right""right", 'top'"top""top""top""top""top", 'top_left'"top_left""top_left""top_left""top_left""top_left", 'top_right'"top_right""top_right""top_right""top_right""top_right"

RelatesToRelatesToRelatesToRelatesTorelatesTorelates_to (input_control)  string-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Feste oder relative Positionierung

Parameteranzahl: 1

Defaultwert: 'point' "point" "point" "point" "point" "point"

Werteliste: 'point'"point""point""point""point""point", 'window'"window""window""window""window""window"

LabelIndexLabelIndexLabelIndexLabelIndexlabelIndexlabel_index (output_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Index des neuen Labels in der 3D-Szene.

Ergebnis

Sind die Parameterwerte korrekt, dann liefert add_scene_3d_labeladd_scene_3d_labelAddScene3dLabelAddScene3dLabelAddScene3dLabeladd_scene_3d_label den Wert TRUE. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

create_scene_3dcreate_scene_3dCreateScene3dCreateScene3dCreateScene3dcreate_scene_3d

Nachfolger

set_scene_3d_label_paramset_scene_3d_label_paramSetScene3dLabelParamSetScene3dLabelParamSetScene3dLabelParamset_scene_3d_label_param

Siehe auch

remove_scene_3d_instanceremove_scene_3d_instanceRemoveScene3dInstanceRemoveScene3dInstanceRemoveScene3dInstanceremove_scene_3d_instance

Modul

3D Metrology