annofab_3dpc.annotation module#
- exception annofab_3dpc.annotation.CuboidAnnotationDecodeError[ソース]#
- add_note()#
Exception.add_note(note) -- add a note to the exception
- with_traceback()#
Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.
- class annofab_3dpc.annotation.CuboidAnnotationDetailDataV1(shape: annofab_3dpc.annotation.CuboidShapeV1, kind: str = 'CUBOID', version: str = '1')[ソース]#
- class annofab_3dpc.annotation.CuboidAnnotationDetailDataV2(shape: annofab_3dpc.annotation.CuboidShapeV2, kind: str = 'CUBOID', version: str = '2')[ソース]#
- class annofab_3dpc.annotation.CuboidDirection(front: Vector3, up: Vector3)[ソース]#
cuboidの向き(長さ1のベクトル)
- classmethod from_euler_angles(euler_angles: EulerAnglesZXY) CuboidDirection [ソース]#
オイラー角から生成する。
- パラメータ:
euler_angles -- z-x-y系のオイラー角
- classmethod from_quaternion(quaternion: Sequence[float] | ndarray) CuboidDirection [ソース]#
quaternion から生成する。
メモ
以下のコードを移植した。 BabylonJS/Babylon.js
- パラメータ:
quaternion -- wxyzの1次元配列
- class annofab_3dpc.annotation.CuboidShapeV1(dimensions: annofab_3dpc.annotation.SizeV1, location: annofab_3dpc.annotation.Location, rotation: annofab_3dpc.annotation.EulerAnglesZXY, direction: annofab_3dpc.annotation.Vector3 | None = None)[ソース]#
-
- rotation: EulerAnglesZXY#
cuboidの回転
- class annofab_3dpc.annotation.CuboidShapeV2(dimensions: annofab_3dpc.annotation.Size, location: annofab_3dpc.annotation.Location, rotation: annofab_3dpc.annotation.EulerAnglesZXY, direction: annofab_3dpc.annotation.CuboidDirection)[ソース]#
-
- direction: CuboidDirection#
cuboidの向き(cuboidの回転から一意に決まる)
- rotation: EulerAnglesZXY#
cuboidの回転
- class annofab_3dpc.annotation.EulerAnglesZXY(x: float, y: float, z: float)[ソース]#
z-x-y系のオイラー角(右手系)。 単位はラジアン。
- classmethod from_quaternion(quaternion: Sequence[float] | ndarray) EulerAnglesZXY [ソース]#
quaternion から生成する。以下のコードを移植した。 BabylonJS/Babylon.js
- パラメータ:
quaternion -- wxyzの1次元配列
- to_quaternion() List[float] [ソース]#
クォータニオンを生成する。
以下のサイトから移植 BabylonJS/Babylon.js
- 戻り値:
クォータニオン[w,x,y,z]
- x: float#
X軸周りの回転角度[ラジアン]
- y: float#
Y軸周りの回転角度[ラジアン]
- z: float#
Z軸周りの回転角度[ラジアン]
- class annofab_3dpc.annotation.SegmentAnnotationDetailData(data_uri: str)[ソース]#
- data_uri: str#
セグメント情報が格納されたファイルのパス
- class annofab_3dpc.annotation.SegmentData(points: List[int], kind: str = 'SEGMENT', version: str = '1')[ソース]#
- points: List[int]#
セグメントに含まれる点の集合。数値はアノテーション対象の点群の、0-originでのindex
- class annofab_3dpc.annotation.Size(width: float, height: float, depth: float)[ソース]#
- depth: float#
cuboid座標系のX軸方向の長さ
- height: float#
cuboid座標系のZ軸方向の長さ
- width: float#
cuboid座標系のY軸方向の長さ
- class annofab_3dpc.annotation.SizeV1(width: float, height: float, depth: float)[ソース]#
- depth: float#
cuboid座標系のZ軸方向の長さ
- height: float#
cuboid座標系のY軸方向の長さ
- width: float#
cuboid座標系のX軸方向の長さ
- annofab_3dpc.annotation.convert_annotation_detail_data(dict_data: Dict[str, Any]) Any [ソース]#
SimpleAnnotationDetailクラスのdict型であるdataプロパティを、3DPC Editor用のDataclassに変換します。 3DPC Editor用のDataclassに変換できない場合は、引数をそのまま返します。
- パラメータ:
dict_data -- SimpleAnnotationDetailクラスのdict型のdataプロパティ
- 戻り値:
3DPC Editor用のDataclass