static PropertyPath make_property_path(PropIdentity identity) { var neighborInfo = typeof(RUtils <>).MakeGenericType(identity.Type); var neighborMethod = neighborInfo.GetMethod("make_property_path", BindingFlags.Static | BindingFlags.NonPublic); return((PropertyPath)neighborMethod?.Invoke(null, new object[] { identity.Path })); }
/// <summary> /// Returns an structure for manipulating property what placed on <paramref name="path"/>, if we start looking from specified <paramref name="contextType"/>. /// Is will return null, when path is wrong. /// </summary> /// <param name="contextType"></param> //todo: documentation /// <param name="path"></param> /// <returns></returns> public static PropertyPath GetPropertyPath(this Type contextType, string path) { var identity = new PropIdentity(contextType, path); if (_propertyPaths.TryGetValue(identity, out var propertyPath)) { return(propertyPath); } propertyPath = make_property_path(identity); if (!_propertyPaths.TryAdd(identity, propertyPath)) { propertyPath = _propertyPaths[identity]; } return(propertyPath); }
public bool Equals(PropIdentity other) { return(other != null && other.Path == Path && other.Type == Type); }
public static extern bool PNPropSetParent(int avatarIndex, PropIdentity propId, int parentBoneId);
public static extern bool PNPropHandleNodeAsBVHPart(int avatarIndex, PropIdentity propId, bool enable);
public static extern bool PNPropEnable(int avatarIndex, PropIdentity propId, bool enable);
public static extern bool PNPropSetInfo(int avatarIndex, PropIdentity propId, PropInformation pi);
public static extern bool PNPropGetInfo(int avatarIndex, PropIdentity propId, ref PropInformation piBuff);
public static extern bool PNPropSetDirection(int avatarIndex, PropIdentity propId, Vector3_t rotate);
public static extern bool PNPropSetEndOffset(int avatarIndex, PropIdentity propId, Vector3_t offset);
public static extern bool PNPropSetLength(int avatarIndex, PropIdentity propId, float probLength);
public static extern bool PNPropRemoveSensor(int avatarIndex, PropIdentity propId);
public static extern bool PNPropBindSensor(int avatarIndex, PropIdentity propId, int sensorId);