2012-01-29 17:39:56 +00:00
|
|
|
#ifndef _PAYSAGES_ZONE_H_
|
|
|
|
#define _PAYSAGES_ZONE_H_
|
|
|
|
|
|
|
|
#include "shared/types.h"
|
2012-04-22 17:12:39 +00:00
|
|
|
#include "pack.h"
|
2012-01-29 17:39:56 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2012-04-27 20:05:33 +00:00
|
|
|
typedef struct Zone Zone;
|
|
|
|
|
2012-04-05 20:09:39 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2012-06-17 09:40:40 +00:00
|
|
|
double value;
|
|
|
|
double hardmin;
|
|
|
|
double softmin;
|
|
|
|
double softmax;
|
|
|
|
double hardmax;
|
2012-04-05 20:09:39 +00:00
|
|
|
} ZoneRangeCondition;
|
|
|
|
|
2012-01-29 17:39:56 +00:00
|
|
|
Zone* zoneCreate();
|
|
|
|
void zoneDelete(Zone* zone);
|
2012-04-22 17:12:39 +00:00
|
|
|
void zoneSave(PackStream* stream, Zone* zone);
|
|
|
|
void zoneLoad(PackStream* stream, Zone* zone);
|
2012-01-29 17:39:56 +00:00
|
|
|
void zoneCopy(Zone* source, Zone* destination);
|
2012-06-17 09:40:40 +00:00
|
|
|
void zoneIncludeCircleArea(Zone* zone, double value, double centerx, double centerz, double softradius, double hardradius);
|
|
|
|
void zoneExcludeCircleArea(Zone* zone, double centerx, double centerz, double softradius, double hardradius);
|
2012-04-05 20:09:39 +00:00
|
|
|
|
|
|
|
int zoneAddHeightRange(Zone* zone);
|
|
|
|
int zoneGetHeightRangeCount(Zone* zone);
|
|
|
|
int zoneGetHeightRange(Zone* zone, int position, ZoneRangeCondition* range);
|
|
|
|
int zoneSetHeightRange(Zone* zone, int position, ZoneRangeCondition* range);
|
2012-06-17 09:40:40 +00:00
|
|
|
int zoneAddHeightRangeQuick(Zone* zone, double value, double hardmin, double softmin, double softmax, double hardmax);
|
2012-04-05 20:09:39 +00:00
|
|
|
|
|
|
|
int zoneAddSlopeRange(Zone* zone);
|
|
|
|
int zoneGetSlopeRangeCount(Zone* zone);
|
|
|
|
int zoneGetSlopeRange(Zone* zone, int position, ZoneRangeCondition* range);
|
|
|
|
int zoneSetSlopeRange(Zone* zone, int position, ZoneRangeCondition* range);
|
2012-06-17 09:40:40 +00:00
|
|
|
int zoneAddSlopeRangeQuick(Zone* zone, double value, double hardmin, double softmin, double softmax, double hardmax);
|
2012-04-05 20:09:39 +00:00
|
|
|
|
2012-06-17 09:40:40 +00:00
|
|
|
double zoneGetValue(Zone* zone, Vector3 location, Vector3 normal);
|
2012-01-29 17:39:56 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|