potree-core
Version:
Potree wrapper for three.js applications
53 lines (52 loc) • 1.64 kB
TypeScript
export declare enum PointAttributeName {
POSITION_CARTESIAN = 0,// float x, y, z;
COLOR_PACKED = 1,// byte r, g, b, a; I = [0,1]
COLOR_FLOATS_1 = 2,// float r, g, b; I = [0,1]
COLOR_FLOATS_255 = 3,// float r, g, b; I = [0,255]
NORMAL_FLOATS = 4,// float x, y, z;
FILLER = 5,
INTENSITY = 6,
CLASSIFICATION = 7,
NORMAL_SPHEREMAPPED = 8,
NORMAL_OCT16 = 9,
NORMAL = 10
}
export interface PointAttributeType {
ordinal: number;
size: number;
}
export declare const POINT_ATTRIBUTE_TYPES: Record<string, PointAttributeType>;
export interface IPointAttribute {
name: PointAttributeName;
type: PointAttributeType;
numElements: number;
byteSize: number;
}
export interface IPointAttributes {
attributes: IPointAttribute[];
byteSize: number;
size: number;
}
export declare const POINT_ATTRIBUTES: {
POSITION_CARTESIAN: IPointAttribute;
RGBA_PACKED: IPointAttribute;
COLOR_PACKED: IPointAttribute;
RGB_PACKED: IPointAttribute;
NORMAL_FLOATS: IPointAttribute;
FILLER_1B: IPointAttribute;
INTENSITY: IPointAttribute;
CLASSIFICATION: IPointAttribute;
NORMAL_SPHEREMAPPED: IPointAttribute;
NORMAL_OCT16: IPointAttribute;
NORMAL: IPointAttribute;
};
export type PointAttributeStringName = keyof typeof POINT_ATTRIBUTES;
export declare class PointAttributes implements IPointAttributes {
attributes: IPointAttribute[];
byteSize: number;
size: number;
constructor(pointAttributeNames?: PointAttributeStringName[]);
add(pointAttribute: IPointAttribute): void;
hasColors(): boolean;
hasNormals(): boolean;
}