## Public API Reference

- Main Page
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iPcEnvAttractor Struct Reference

A property class representing an attractor or a repulsor. More...

`#include <propclass/mechenv.h>`

List of all members.

## Public Member Functions

virtual float | GetMaxRadius ()=0
| Get the maximum radius of the attractor's field.
virtual float | GetStrengthAtCenter ()=0
| Get magnitude of the force at the center of the attractor.
virtual void | SetMaxRadius (float radius)=0
| Set the maximum radius of the attractor's field.
virtual void | SetStrengthAtCenter (float strength)=0
| Set the magnitude of the force at the center of the attractor.

## Detailed Description

A property class representing an attractor or a repulsor.

This property class acts on nearby entities with an iPcDynamicBody.

This property class supports the following properties (add prefix 'cel.property.' to get the ID of the property):

- strength (float, read/write): the strength of the field at its center.
- radius (float, read/write): the maximum radius at which the field affects an object.

Definition at line 49 of file mechenv.h.

## Member Function Documentation

virtual float iPcEnvAttractor::GetMaxRadius | ( |  | ) | `[pure virtual]`

| Get the maximum radius of the attractor's field.

virtual float iPcEnvAttractor::GetStrengthAtCenter | ( |  | ) | `[pure virtual]`

| Get magnitude of the force at the center of the attractor.

virtual void iPcEnvAttractor::SetMaxRadius | ( | float | radius | ) | `[pure virtual]`

| Set the maximum radius of the attractor's field.

virtual void iPcEnvAttractor::SetStrengthAtCenter | ( | float | strength | ) | `[pure virtual]`

| Set the magnitude of the force at the center of the attractor. (negative creates a repulsor)

The documentation for this struct was generated from the following file:

- propclass/mechenv.h