//========================================================================
// E3D library
//
// - PointSet Geometry
//
// AUTHOR:  Gabor Nagy
// DATE:    2024-Aug-18 20:47:24
//
// Copyright (C) 1996-2026 by Gabor Nagy. All rights reserved.
//========================================================================
#ifndef _E3D_PointSet_h
#define _E3D_PointSet_h


#ifndef _E3D_VertexGeometry_h
#include <E3D/VertexGeometry.h>
#endif

#ifndef _E3D_Material_h
#include <E3D/Material.h>
#endif


#if defined (__cplusplus) && (!(defined (__CPLUSLIBS)))
extern "C" {
#endif


enum
{
	E3dPOINTS = 1,
	E3dSPRITES
};

typedef struct
{
	E3dVertexGeometryCore;

	char          RenderAs;
	int32_t       PointDiameter;
	E3dMaterial*  Material;
} E3dPointSet;


extern E3dObjectClass  E3dPointSet_class[];


//--------------------------------------------------------
// Function prototypes
//--------------------------------------------------------
extern EBool       E3dPointSet_GetBoundingBox(const E3dPointSet* PPointSet, const uint32_t PWhatToInclude,  E3dBBox* PBBox);
extern EBool       E3dPointSet_GetTransformedBoundingBox(const E3dPointSet* PPointSet, const E3dMatrix PMatrix, const uint32_t PWhatToInclude,  E3dBBox* PBBox);

extern void        E3dPointSet_PointsFree(E3dPointSet* PPointSet);
extern E3dVertex*  E3dPointSet_PointsAdd(E3dPointSet* PPointSet, const EIndex PCount);
extern int         E3dPointSet_PointAttributeAdd(E3dPointSet* PPointSet,  const char* PSemantic, const char* PName, const uint16_t PType, const EIndex PCount,  EResource** PAttrRet);


#if defined (__cplusplus) && (!(defined (__CPLUSLIBS)))
}	// Close scope of 'extern "C"' declaration
#endif

#endif	// _E3D_PointSet_h
