*/
public WlAvatarCharacter getAvatarCharacter(Cell avatarCell,
String userName, AvatarConfigInfo info) {
WorldManager wm = ClientContextJME.getWorldManager();
CharacterParams attributes = new MaleAvatarParams(userName);
// Formulate the configuration URL to load the info. If null, then use
// some default.
String avatarURL = DEFAULT_URL;
if (info != null && info.getAvatarConfigURL() != null) {
avatarURL = info.getAvatarConfigURL();
}
// Formulate the base URL for all default avatar assets. Annotate it
// with the server:port of the primary session.
String baseURL = null;
try {
URL tmpURL = AssetUtils.getAssetURL(BASE_URL, avatarCell);
baseURL = tmpURL.toExternalForm();
} catch (MalformedURLException ex) {
logger.log(Level.WARNING, "Unable to form base url", ex);
return null;
}
// Setup simple model, needs to actually have something to
// play well with the system
PScene simpleScene = new PScene(ClientContextJME.getWorldManager());
simpleScene.addMeshInstance(new PPolygonMesh("PlaceholderMesh"), new PMatrix());
attributes.setUseSimpleStaticModel(true, simpleScene);
attributes.setBaseURL(baseURL);
// Turn of animations for the simple avatar
attributes.setAnimateBody(false);
attributes.setAnimateFace(false);
// Load the avatar using the new collada loading manager
Node node = null;
try {
URL url = new URL(baseURL + avatarURL);